You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assertTrue(emitted.get() < 2000 + RxRingBuffer.SIZE); // should have no more than the buffer size beyond the 2000 in take
152
-
assertEquals(2000, ts.getOnNextEvents().size());
148
+
assertTrue(emitted.get() < 20000 + (RxRingBuffer.SIZE * Schedulers.computation().parallelism())); // should have no more than the buffer size beyond the 20000 in take
149
+
assertEquals(20000, ts.getOnNextEvents().size());
153
150
}
154
151
155
-
// parallel does not support backpressure right now
156
-
@Ignore
157
152
@Test
158
153
publicvoidtestBackpressureOnInnerObserveOn() {
159
154
finalAtomicIntegeremitted = newAtomicInteger();
@@ -188,8 +183,8 @@ public String call(Integer t) {
assertTrue(emitted.get() < 20000 + RxRingBuffer.SIZE); // should have no more than the buffer size beyond the 2000 in take
192
-
assertEquals(2000, ts.getOnNextEvents().size());
186
+
assertTrue(emitted.get() < 20000 + (RxRingBuffer.SIZE * Schedulers.computation().parallelism())); // should have no more than the buffer size beyond the 20000 in take
187
+
assertEquals(20000, ts.getOnNextEvents().size());
193
188
}
194
189
195
190
@Test(timeout = 10000)
@@ -226,7 +221,8 @@ public String call(Integer t) {
226
221
ts.awaitTerminalEvent();
227
222
ts.assertNoErrors();
228
223
System.out.println("emitted: " + emitted.get());
229
-
assertEquals(2000, emitted.get()); // no async, so should be perfect
224
+
// we allow buffering inside each parallel Observable
225
+
assertEquals(RxRingBuffer.SIZE * Schedulers.computation().parallelism(), emitted.get()); // no async, so should be perfect
0 commit comments