File tree 2 files changed +16
-4
lines changed
src/test/java/io/reactivex/internal/operators 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,10 @@ public void subscribe(Subscriber<? super Integer> t1) {
47
47
t1 .onSubscribe (subscription );
48
48
t1 .onNext (1 );
49
49
t1 .onNext (2 );
50
- t1 .onComplete ();
50
+ // observeOn will prevent canceling the upstream upon its termination now
51
+ // this call is racing for that state in this test
52
+ // not doing it will make sure the unsubscribeOn always gets through
53
+ // t1.onComplete();
51
54
}
52
55
});
53
56
@@ -93,7 +96,10 @@ public void subscribe(Subscriber<? super Integer> t1) {
93
96
t1 .onSubscribe (subscription );
94
97
t1 .onNext (1 );
95
98
t1 .onNext (2 );
96
- t1 .onComplete ();
99
+ // observeOn will prevent canceling the upstream upon its termination now
100
+ // this call is racing for that state in this test
101
+ // not doing it will make sure the unsubscribeOn always gets through
102
+ // t1.onComplete();
97
103
}
98
104
});
99
105
Original file line number Diff line number Diff line change @@ -46,7 +46,10 @@ public void subscribe(Observer<? super Integer> t1) {
46
46
t1 .onSubscribe (subscription );
47
47
t1 .onNext (1 );
48
48
t1 .onNext (2 );
49
- t1 .onComplete ();
49
+ // observeOn will prevent canceling the upstream upon its termination now
50
+ // this call is racing for that state in this test
51
+ // not doing it will make sure the unsubscribeOn always gets through
52
+ // t1.onComplete();
50
53
}
51
54
});
52
55
@@ -92,7 +95,10 @@ public void subscribe(Observer<? super Integer> t1) {
92
95
t1 .onSubscribe (subscription );
93
96
t1 .onNext (1 );
94
97
t1 .onNext (2 );
95
- t1 .onComplete ();
98
+ // observeOn will prevent canceling the upstream upon its termination now
99
+ // this call is racing for that state in this test
100
+ // not doing it will make sure the unsubscribeOn always gets through
101
+ // t1.onComplete();
96
102
}
97
103
});
98
104
You can’t perform that action at this time.
0 commit comments