diff --git a/rxjava-core/src/main/java/rx/operators/OperationInterval.java b/rxjava-core/src/main/java/rx/operators/OperationInterval.java index 7e1be94991..72d35d37de 100644 --- a/rxjava-core/src/main/java/rx/operators/OperationInterval.java +++ b/rxjava-core/src/main/java/rx/operators/OperationInterval.java @@ -78,7 +78,6 @@ public void call() { @Override public void call() { wrapped.unsubscribe(); - observer.onCompleted(); } }); } diff --git a/rxjava-core/src/test/java/rx/operators/OperationIntervalTest.java b/rxjava-core/src/test/java/rx/operators/OperationIntervalTest.java index 5f64452e3b..293ff236c9 100644 --- a/rxjava-core/src/test/java/rx/operators/OperationIntervalTest.java +++ b/rxjava-core/src/test/java/rx/operators/OperationIntervalTest.java @@ -66,7 +66,7 @@ public void testInterval() { sub.unsubscribe(); scheduler.advanceTimeTo(4, TimeUnit.SECONDS); verify(observer, never()).onNext(2L); - verify(observer, times(1)).onCompleted(); + verify(observer, never()).onCompleted(); verify(observer, never()).onError(any(Throwable.class)); } @@ -101,11 +101,11 @@ public void testWithMultipleSubscribersStartingAtSameTime() { scheduler.advanceTimeTo(4, TimeUnit.SECONDS); verify(observer, never()).onNext(2L); - verify(observer, times(1)).onCompleted(); + verify(observer, never()).onCompleted(); verify(observer, never()).onError(any(Throwable.class)); verify(observer2, never()).onNext(2L); - verify(observer2, times(1)).onCompleted(); + verify(observer2, never()).onCompleted(); verify(observer2, never()).onError(any(Throwable.class)); } @@ -141,11 +141,11 @@ public void testWithMultipleStaggeredSubscribers() { sub2.unsubscribe(); inOrder1.verify(observer, never()).onNext(anyLong()); - inOrder1.verify(observer, times(1)).onCompleted(); + inOrder1.verify(observer, never()).onCompleted(); verify(observer, never()).onError(any(Throwable.class)); inOrder2.verify(observer2, never()).onNext(anyLong()); - inOrder2.verify(observer2, times(1)).onCompleted(); + inOrder2.verify(observer2, never()).onCompleted(); verify(observer2, never()).onError(any(Throwable.class)); }