@Test public void testFailureRun() throws Throwable { ExecutorSvc svc = run(new ExecutorSvc()); ServiceTerminatingRunnable runnable = new ServiceTerminatingRunnable(svc, new SimpleRunnable(true)); // synchronous in-thread execution svc.execute(runnable); Thread.sleep(1000); assertStopped(svc); assertNotNull(runnable.getException()); }
@Test public void testFailureRun() throws Throwable { ExecutorSvc svc = run(new ExecutorSvc()); ServiceTerminatingRunnable runnable = new ServiceTerminatingRunnable(svc, new SimpleRunnable(true)); // synchronous in-thread execution svc.execute(runnable); Thread.sleep(1000); assertStopped(svc); assertNotNull(runnable.getException()); }
@Test public void testFailureRun() throws Throwable { WorkflowCompositeService svc = run(new WorkflowCompositeService()); ServiceTerminatingRunnable runnable = new ServiceTerminatingRunnable(svc, new SimpleRunnable(true)); // synchronous in-thread execution runnable.run(); assertStopped(svc); assertNotNull(runnable.getException()); }
@Test public void testFailureRun() throws Throwable { WorkflowCompositeService svc = run(new WorkflowCompositeService()); ServiceTerminatingRunnable runnable = new ServiceTerminatingRunnable(svc, new SimpleRunnable(true)); // synchronous in-thread execution runnable.run(); assertStopped(svc); assertNotNull(runnable.getException()); }