use of io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler.DelayedRunnable in project RxJava by ReactiveX.
the class ExecutorSchedulerDelayedRunnableTest method delayedRunnableCrash.
@Test(expected = TestException.class)
@SuppressUndeliverable
public void delayedRunnableCrash() {
DelayedRunnable dl = new DelayedRunnable(new Runnable() {
@Override
public void run() {
throw new TestException();
}
});
dl.run();
}
use of io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler.DelayedRunnable in project RxJava by ReactiveX.
the class ExecutorSchedulerDelayedRunnableTest method dispose.
@Test
public void dispose() {
final AtomicInteger count = new AtomicInteger();
DelayedRunnable dl = new DelayedRunnable(new Runnable() {
@Override
public void run() {
count.incrementAndGet();
}
});
dl.dispose();
dl.dispose();
dl.run();
assertEquals(0, count.get());
}
Aggregations