/** * @return the shell's job controller */ public io.vertx.rxjava.ext.shell.system.JobController jobController() { if (cached_0 != null) { return cached_0; } io.vertx.rxjava.ext.shell.system.JobController ret = io.vertx.rxjava.ext.shell.system.JobController.newInstance(delegate.jobController()); cached_0 = ret; return ret; }
/** * @return the shell's job controller */ public io.vertx.rxjava.ext.shell.system.JobController jobController() { if (cached_0 != null) { return cached_0; } io.vertx.rxjava.ext.shell.system.JobController ret = io.vertx.rxjava.ext.shell.system.JobController.newInstance(delegate.jobController()); cached_0 = ret; return ret; }
@Test public void testClose(TestContext context) { Async endLatch = context.async(2); Async runningLatch = context.async(); commands.add(CommandBuilder.command("foo").processHandler(process -> { process.endHandler(v -> endLatch.countDown()); runningLatch.countDown(); })); Shell shell = server.createShell(); Job job = shell.createJob("foo"); Pty pty = Pty.create(); job.setTty(pty.slave()).statusUpdateHandler(CommandProcessTest.terminateHandler(status -> { endLatch.countDown(); })).run(); runningLatch.awaitSuccess(10000); shell.close(); endLatch.awaitSuccess(10000); context.assertEquals(0, shell.jobController().jobs().size()); }