IN PROGRESS - BATCH-858: Pause / resume of Job

pausing should now work
This commit is contained in:
robokaso
2008-10-21 16:26:40 +00:00
parent 0d8e32282a
commit 336c267dd8
4 changed files with 34 additions and 13 deletions

View File

@@ -93,17 +93,24 @@ public class RemoteLauncherTests {
// sleep long enough to avoid race conditions (serializable tx isolation
// doesn't work with HSQL)
Thread.sleep(SLEEP_INTERVAL);
// assertEquals(1, launcher.getRunningExecutions("loopJob").size());
launcher.pause(executionId);
Thread.sleep(SLEEP_INTERVAL);
// assertEquals(0, launcher.getRunningExecutions("loopJob").size());
logger.debug(launcher.getSummary(executionId));
long resumedId = launcher.resume(executionId);
assertEquals("Picked up the same execution after pause and resume", executionId, resumedId);
// launcher.pause(executionId);
// Thread.sleep(SLEEP_INTERVAL);
// long resumeId2 = launcher.resume(executionId);
// assertEquals("Picked up the same execution after pause and resume", executionId, resumeId2);
Thread.sleep(SLEEP_INTERVAL);
launcher.pause(executionId);
Thread.sleep(SLEEP_INTERVAL);
// assertEquals(0, launcher.getRunningExecutions("loopJob").size());
logger.debug(launcher.getSummary(executionId));
long resumeId2 = launcher.resume(executionId);
assertEquals("Picked up the same execution after pause and resume", executionId, resumeId2);
launcher.stop(executionId);
}