Skip to content

Commit 2e211ce

Browse files
fix: add wait in retry test (#41)
Adding a wait in the retry test to ensure that the scheduled retry completes.
1 parent 5be8343 commit 2e211ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

google-cloud-pubsublite/src/test/java/com/google/cloud/pubsublite/internal/wire/PublisherImplTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ public void retryableError_RecreatesAndRetriesAll() throws Exception {
247247
.when(mockPublisherFactory)
248248
.New(any(), any(), eq(INITIAL_PUBLISH_REQUEST));
249249
leakedOffsetStream.onError(Status.UNKNOWN.asRuntimeException());
250+
251+
// wait for retry to complete
252+
Thread.sleep(500);
253+
250254
verify(mockBatchPublisher).close();
251255
verifyNoMoreInteractions(mockBatchPublisher);
252256
verify(mockPublisherFactory, times(2)).New(any(), any(), eq(INITIAL_PUBLISH_REQUEST));

0 commit comments

Comments
 (0)