You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2015/11/06 22:39:52 UTC

usergrid git commit: Fixes race condition in test

Repository: usergrid
Updated Branches:
  refs/heads/2.1-release 39ccdb191 -> 5ef62bbaf


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/5ef62bba
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/5ef62bba
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/5ef62bba

Branch: refs/heads/2.1-release
Commit: 5ef62bbaf295a88bd2c999827cc45d0c43ad247b
Parents: 39ccdb1
Author: Todd Nine <tn...@apigee.com>
Authored: Fri Oct 30 17:32:19 2015 -0600
Committer: Michael Russo <mi...@gmail.com>
Committed: Fri Nov 6 13:39:29 2015 -0800

----------------------------------------------------------------------
 .../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/5ef62bba/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 1d940d0..a0e9118 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();