Repository: incubator-usergrid Updated Branches: refs/heads/two-dot-o-dev 3480a3637 -> f2aa40325
Added fix to test file PublishRxtest now PublishRxTest Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f2aa4032 Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f2aa4032 Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f2aa4032 Branch: refs/heads/two-dot-o-dev Commit: f2aa4032565eb6295c6568b3fe7049eb14cdcf73 Parents: 3480a36 Author: GERey <gre...@apigee.com> Authored: Tue Apr 21 12:34:39 2015 -0700 Committer: GERey <gre...@apigee.com> Committed: Tue Apr 21 12:34:39 2015 -0700 ---------------------------------------------------------------------- .../corepersistence/index/PublishRxTest.java | 7 +++ .../corepersistence/index/PublishRxtest.java | 61 -------------------- 2 files changed, 7 insertions(+), 61 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2aa4032/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxTest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxTest.java new file mode 100644 index 0000000..1d41286 --- /dev/null +++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxTest.java @@ -0,0 +1,7 @@ +package org.apache.usergrid.corepersistence.index; + + +/** + * Created by ApigeeCorporation on 4/21/15. + */ +public class PublishRxTest {} http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2aa4032/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxtest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxtest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxtest.java deleted file mode 100644 index 1eb00c2..0000000 --- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/PublishRxtest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.usergrid.corepersistence.index; - - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import org.junit.Test; - -import rx.Observable; -import rx.Subscription; -import rx.observables.ConnectableObservable; -import rx.schedulers.Schedulers; - -import static org.junit.Assert.assertTrue; - - -/** - * Validates the Rx scheduler works as expected with publish - */ -public class PublishRxTest { - - @Test - public void testPublish() throws InterruptedException { - - final int count = 10; - - final CountDownLatch latch = new CountDownLatch( count ); - - final Subscription connectedObservable = - Observable.range( 0, count ).doOnNext( integer -> latch.countDown() ).subscribeOn( Schedulers.io() ) - .subscribe(); - - - final boolean completed = latch.await( 5, TimeUnit.SECONDS ); - - assertTrue( "publish1 behaves as expected", completed ); - - final boolean completedSubscription = connectedObservable.isUnsubscribed();; - - assertTrue("Subscription complete", completedSubscription); - } -}