Skip to content

Commit

Permalink
Improve determinism of GroupBy.testUnsubscribe
Browse files Browse the repository at this point in the history
Increased delta value from 2 to 10 to try and resolve issue reported in issue ReactiveX#329
  • Loading branch information
benjchristensen committed Aug 31, 2013
1 parent bad2ae1 commit a222d1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rxjava-core/src/main/java/rx/operators/OperationGroupBy.java
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ public void onNext(String outputMessage) {
// sentEvents will go until 'eventCounter' hits 20 and then unsubscribes
// which means it will also send (but ignore) the 19/20 events for the other group
// It will not however send all 100 events.
assertEquals(39, sentEventCounter.get(), 2);
// gave it a delta of 2 so the threading/unsubscription race has wiggle
assertEquals(39, sentEventCounter.get(), 10);
// 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
}

private static class Event {
Expand Down

0 comments on commit a222d1c

Please sign in to comment.