@Override public ServiceParent buildService(Service... services) { ServiceParent parent = new WorkflowCompositeService("test", services); parent.init(new Configuration()); return parent; }
@Override public ServiceParent buildService(Service... services) { ServiceParent parent = new WorkflowCompositeService("test", services); parent.init(new Configuration()); return parent; }
@Test public void testBasicRun() throws Throwable { WorkflowCompositeService svc = run(new WorkflowCompositeService()); ServiceTerminatingRunnable runnable = new ServiceTerminatingRunnable(svc, new SimpleRunnable()); // synchronous in-thread execution runnable.run(); assertStopped(svc); }
@Test public void testBasicRun() throws Throwable { WorkflowCompositeService svc = run(new WorkflowCompositeService()); ServiceTerminatingRunnable runnable = new ServiceTerminatingRunnable(svc, new SimpleRunnable()); // synchronous in-thread execution runnable.run(); assertStopped(svc); }
@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()); }