Skip to content

Commit 525bf58

Browse files
committed
Fix flaky MaybeUnbsubscribeOnTest.normal
1 parent 679cdf6 commit 525bf58

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/io/reactivex/internal/operators/maybe/MaybeUnsubscribeOnTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ public void run() throws Exception {
4747

4848
assertTrue(cdl.await(5, TimeUnit.SECONDS));
4949

50+
int times = 10;
51+
52+
while (times-- > 0 && pp.hasSubscribers()) {
53+
Thread.sleep(100);
54+
}
55+
5056
assertFalse(pp.hasSubscribers());
5157

5258
assertNotEquals(Thread.currentThread().getName(), name[0]);

0 commit comments

Comments
 (0)