@Test(timeout = 60000) public void testUnsubscribeDelayedTasks() throws Exception { RxJavaEventloopScheduler scheduler = new RxJavaEventloopScheduler(new NioEventLoopGroup()); final EventloopWorker worker = (EventloopWorker) scheduler.createWorker(); assertThat("New worker already has subscriptions.", worker.hasDelayScheduledSubscriptions(), is(false)); Subscription subscription = worker.schedule(new Action0() { @Override public void call() { } }, 100, TimeUnit.DAYS); assertThat("No subscriptions post schedule.", worker.hasDelayScheduledSubscriptions(), is(true)); subscription.unsubscribe(); assertThat("Subscription not removed post cancellation.", worker.hasDelayScheduledSubscriptions(), is(false)); }
@Override public Worker createWorker() { final EventLoop eventLoop = eventLoopGroup.next(); return new EventloopWorker(eventLoop); }
RxJavaEventloopScheduler extends Scheduler { @Override public Worker createWorker() { final EventLoop eventLoop = eventLoopGroup.next(); return new EventloopWorker(eventLoop); } }
RxJavaEventloopScheduler extends Scheduler { @Override public Worker createWorker() { final EventLoop eventLoop = eventLoopGroup.next(); return new EventloopWorker(eventLoop); } RxJavaEventloopScheduler(EventLoopGroup eventLoopGroup); }
RxJavaEventloopScheduler extends Scheduler { @Override public Worker createWorker() { final EventLoop eventLoop = eventLoopGroup.next(); return new EventloopWorker(eventLoop); } RxJavaEventloopScheduler(EventLoopGroup eventLoopGroup); @Override Worker createWorker(); }
RxJavaEventloopScheduler extends Scheduler { @Override public Worker createWorker() { final EventLoop eventLoop = eventLoopGroup.next(); return new EventloopWorker(eventLoop); } RxJavaEventloopScheduler(EventLoopGroup eventLoopGroup); @Override Worker createWorker();  }