@Test
public void requestCancelConditionalRace2() {

    for (int i = 0; i < TestHelper.RACE_DEFAULT_LOOPS; i++) {
        final TestSubscriber<Integer> ts = new TestSubscriber<Integer>(0L);
        Runnable r1 = new Runnable() {
            @Override
            public void run() {
                ts.request(Long.MAX_VALUE);
            }
        };
        Runnable r2 = new Runnable() {
            @Override
            public void run() {
                ts.cancel();
            }
        };
        Flowable.fromIterable(Arrays.asList(1, 2, 3, 4))
        .filter(Functions.alwaysTrue())
        .subscribe(ts);
        TestHelper.race(r1, r2);
    }
}