From a222d1c9eab926807b2687aefc3d6f49f69f20c1 Mon Sep 17 00:00:00 2001 From: Ben Christensen Date: Sat, 31 Aug 2013 14:02:54 -0700 Subject: [PATCH] Improve determinism of GroupBy.testUnsubscribe Increased delta value from 2 to 10 to try and resolve issue reported in issue https://github.com/Netflix/RxJava/issues/329 --- rxjava-core/src/main/java/rx/operators/OperationGroupBy.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rxjava-core/src/main/java/rx/operators/OperationGroupBy.java b/rxjava-core/src/main/java/rx/operators/OperationGroupBy.java index 4a673b6fee..77e04324b0 100644 --- a/rxjava-core/src/main/java/rx/operators/OperationGroupBy.java +++ b/rxjava-core/src/main/java/rx/operators/OperationGroupBy.java @@ -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 {