Skip to content

Commit 2b921eb

Browse files
Test timing
Adjust timing for slower machines (such as CloudBees)
1 parent 593185a commit 2b921eb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

rxjava-core/src/test/java/rx/BackpressureTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public Observable<Integer> call(Integer i) {
180180
}
181181

182182
@Ignore
183-
@Test(timeout = 1000)
183+
@Test(timeout = 2000)
184184
public void testZipSync() {
185185
int NUM = (int) ((int) RxRingBuffer.SIZE * 4.1);
186186
AtomicInteger c1 = new AtomicInteger();
@@ -208,7 +208,7 @@ public Integer call(Integer t1, Integer t2) {
208208
}
209209

210210
@Ignore
211-
@Test(timeout = 1000)
211+
@Test(timeout = 2000)
212212
public void testZipAsync() {
213213
int NUM = (int) ((int) RxRingBuffer.SIZE * 2.1);
214214
AtomicInteger c1 = new AtomicInteger();
@@ -337,7 +337,7 @@ public void onNext(Integer t) {
337337
assertEquals(20, batches.get());
338338
}
339339

340-
@Test(timeout = 1000)
340+
@Test(timeout = 2000)
341341
public void testUserSubscriberUsingRequestAsync() throws InterruptedException {
342342
AtomicInteger c = new AtomicInteger();
343343
final AtomicInteger totalReceived = new AtomicInteger();
@@ -380,7 +380,7 @@ public void onNext(Integer t) {
380380
assertEquals(20, batches.get());
381381
}
382382

383-
@Test(timeout = 1000)
383+
@Test(timeout = 2000)
384384
public void testFirehoseFailsAsExpected() {
385385
AtomicInteger c = new AtomicInteger();
386386
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
@@ -391,7 +391,7 @@ public void testFirehoseFailsAsExpected() {
391391
assertTrue(ts.getOnErrorEvents().get(0) instanceof MissingBackpressureException);
392392
}
393393

394-
@Test(timeout = 1000)
394+
@Test(timeout = 2000)
395395
public void testOnBackpressureDrop() {
396396
int NUM = (int) ((int) RxRingBuffer.SIZE * 1.1); // > 1 so that take doesn't prevent buffer overflow
397397
AtomicInteger c = new AtomicInteger();
@@ -405,7 +405,7 @@ public void testOnBackpressureDrop() {
405405
assertTrue(NUM < ts.getOnNextEvents().get(NUM - 1).intValue());
406406
}
407407

408-
@Test(timeout = 1000)
408+
@Test(timeout = 2000)
409409
public void testOnBackpressureBuffer() {
410410
int NUM = (int) ((int) RxRingBuffer.SIZE * 1.1); // > 1 so that take doesn't prevent buffer overflow
411411
AtomicInteger c = new AtomicInteger();

rxjava-core/src/test/java/rx/internal/operators/OperatorMergeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ public void onNext(Integer t) {
669669
if (t < 100)
670670
try {
671671
// force a slow consumer
672-
Thread.sleep(2);
672+
Thread.sleep(1);
673673
} catch (InterruptedException e) {
674674
e.printStackTrace();
675675
}

0 commit comments

Comments
 (0)