Skip to content

Commit

Permalink
fix: add wait in retry test (#41)
Browse files Browse the repository at this point in the history
Adding a wait in the retry test to ensure that the scheduled retry completes.
  • Loading branch information
hannahrogers-google committed May 18, 2020
1 parent 5be8343 commit 2e211ce
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ public void retryableError_RecreatesAndRetriesAll() throws Exception {
.when(mockPublisherFactory)
.New(any(), any(), eq(INITIAL_PUBLISH_REQUEST));
leakedOffsetStream.onError(Status.UNKNOWN.asRuntimeException());

// wait for retry to complete
Thread.sleep(500);

verify(mockBatchPublisher).close();
verifyNoMoreInteractions(mockBatchPublisher);
verify(mockPublisherFactory, times(2)).New(any(), any(), eq(INITIAL_PUBLISH_REQUEST));
Expand Down

0 comments on commit 2e211ce

Please sign in to comment.