usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [50/50] [abbrv] usergrid git commit: Fixes race condition in test
Date Fri, 30 Oct 2015 23:33:24 GMT
Fixes race condition in test


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/b031d4d3
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/b031d4d3
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/b031d4d3

Branch: refs/heads/master
Commit: b031d4d3da09ee65dcde5ab7521627bb2782c9ea
Parents: b422364
Author: Todd Nine <tnine@apigee.com>
Authored: Fri Oct 30 17:32:19 2015 -0600
Committer: Todd Nine <tnine@apigee.com>
Committed: Fri Oct 30 17:32:19 2015 -0600

----------------------------------------------------------------------
 .../java/org/apache/usergrid/corepersistence/index/RxTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/b031d4d3/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
index d7b0bdb..ce78b15 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
@@ -45,10 +45,10 @@ public class RxTest {
 
         final int count = 10;
 
-        final CountDownLatch latch = new CountDownLatch( count );
+        final CountDownLatch latch = new CountDownLatch( count+1 );
 
         final Subscription connectedObservable =
-            Observable.range( 0, count ).doOnNext( integer -> latch.countDown() ).subscribeOn(
Schedulers.io() )
+            Observable.range( 0, count ).doOnNext( integer -> latch.countDown() ).doOnCompleted(
() -> latch.countDown() ).subscribeOn( Schedulers.io() )
                       .subscribe();
 
 


Mime
View raw message