Skip to content

Commit 35f2b2f

Browse files
committed
Fixing UnitTest
1 parent 429611e commit 35f2b2f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rxjava-core/src/main/java/rx/operators/OperationObserveOn.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,17 @@ public void testObserveOn() {
6969

7070
@Test
7171
@SuppressWarnings("unchecked")
72-
public void testOrdering() {
72+
public void testOrdering() throws InterruptedException {
7373
Observable<String> obs = Observable.from("one", null, "two", "three", "four");
7474

7575
Observer<String> observer = mock(Observer.class);
7676

7777
InOrder inOrder = inOrder(observer);
7878

7979
obs.observeOn(Schedulers.threadPoolForComputation()).subscribe(observer);
80+
81+
Thread.sleep(500); // !!! not a true unit test
82+
8083
inOrder.verify(observer, times(1)).onNext("one");
8184
inOrder.verify(observer, times(1)).onNext(null);
8285
inOrder.verify(observer, times(1)).onNext("two");

0 commit comments

Comments
 (0)