@Test public void testLs() throws Throwable { initProcess(commandFactory.ls(testDir)); exec(); assertFalse(process.isProcessRunning()); Integer exitCode = process.getExitCode(); assertNotNull("null exit code", exitCode); assertEquals(0, exitCode.intValue()); // assert that the service did not fail assertNull(process.getFailureCause()); }
@Test public void testLs() throws Throwable { initProcess(commandFactory.ls(testDir)); process.start(); //in-thread wait process.run(); //here stopped assertTrue("process start callback not received", started); assertTrue("process stop callback not received", stopped); assertFalse(process.isRunning()); assertEquals(0, process.getExitCode().intValue()); }
@Test public void testLs() throws Throwable { initProcess(commandFactory.ls(testDir)); exec(); assertFalse(process.isProcessRunning()); Integer exitCode = process.getExitCode(); assertNotNull("null exit code", exitCode); assertEquals(0, exitCode.intValue()); // assert that the service did not fail assertNull(process.getFailureCause()); }
@Test public void testLs() throws Throwable { initProcess(commandFactory.ls(testDir)); process.start(); //in-thread wait process.run(); //here stopped assertTrue("process start callback not received", started); assertTrue("process stop callback not received", stopped); assertFalse(process.isRunning()); assertEquals(0, process.getExitCode().intValue()); }