Skip to content

Commit 1cc2f6a

Browse files
Improve determinism of GroupBy.testUnsubscribe
Increased delta value from 2 to 10 to try and resolve issue reported in issue #329
1 parent ed30a26 commit 1cc2f6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rxjava-core/src/main/java/rx/operators/OperationGroupBy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ public void onNext(String outputMessage) {
548548
// sentEvents will go until 'eventCounter' hits 20 and then unsubscribes
549549
// which means it will also send (but ignore) the 19/20 events for the other group
550550
// It will not however send all 100 events.
551-
assertEquals(39, sentEventCounter.get(), 2);
552-
// gave it a delta of 2 so the threading/unsubscription race has wiggle
551+
assertEquals(39, sentEventCounter.get(), 10);
552+
// gave it a delta of 10 to account for the threading/unsubscription race condition which can vary depending on a machines performance, thread-scheduler, etc
553553
}
554554

555555
private static class Event {

0 commit comments

Comments
 (0)