Skip to content

Commit cac2b30

Browse files
authored
Flaky test fix for StoringSubscriberTest (#6420)
* flaky test fix * changelog removed
1 parent eb3f3e6 commit cac2b30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/src/test/java/software/amazon/awssdk/utils/async/StoringSubscriberTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ public void cancel() {
159159
}
160160
};
161161

162-
subscriber.onSubscribe(subscription);
163-
164162
Future<Object> consumerFuture = consumer.submit(() -> {
165163
int expectedMessageNumber = 0;
166164
while (testRunning.get()) {
@@ -183,6 +181,8 @@ public void cancel() {
183181
return null;
184182
});
185183

184+
subscriber.onSubscribe(subscription);
185+
186186
Thread.sleep(5_000);
187187
testRunning.set(false);
188188
consumerFuture.get();

0 commit comments

Comments
 (0)