Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spkrka committed Feb 23, 2015
1 parent aaf3608 commit 03c6c2a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/java/com/spotify/futures/AsyncRetrierTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ public void testRetryDelayMillis() throws Exception {
assertEquals("success", s);
}

@Test
public void testRetryWithDefaultDelay() throws Exception {
ListenableFuture<String> retry = retrier.retry(fun, 5);

executorService.tick(1, MILLISECONDS);
assertTrue(retry.isDone());

String s = getUninterruptibly(retry);

assertEquals("success", s);
}

@Test
public void testRetryDelayTimeUnit() throws Exception {
ListenableFuture<String> retry = retrier.retry(fun, 5, 1, SECONDS);
Expand Down

0 comments on commit 03c6c2a

Please sign in to comment.