REOPENED - issue BATCH-1338: Allow segregation of jobs by type or origin

Fixed broken build re-jig JobRegistryBackgroundJobRunner
This commit is contained in:
dsyer
2009-09-09 11:42:12 +00:00
parent f98c5775ed
commit def829f87a
4 changed files with 93 additions and 27 deletions

View File

@@ -58,7 +58,9 @@ public class RemoteLauncherTests {
@Test
public void testConnect() throws Exception {
String message = errors.isEmpty() ? "" : errors.get(0).getMessage();
assertEquals(message, 0, errors.size());
if (!errors.isEmpty()) {
fail(message);
}
assertTrue(isConnected());
}
@@ -94,11 +96,11 @@ 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());
// assertEquals(1, launcher.getRunningExecutions("loopJob").size());
launcher.stop(executionId);
Thread.sleep(SLEEP_INTERVAL);
// assertEquals(0, launcher.getRunningExecutions("loopJob").size());
// assertEquals(0, launcher.getRunningExecutions("loopJob").size());
logger.debug(launcher.getSummary(executionId));
long resumedId = launcher.restart(executionId);
assertNotSame("Picked up the same execution after pause and resume", executionId, resumedId);
@@ -107,7 +109,7 @@ public class RemoteLauncherTests {
launcher.stop(resumedId);
Thread.sleep(SLEEP_INTERVAL);
// assertEquals(0, launcher.getRunningExecutions("loopJob").size());
// assertEquals(0, launcher.getRunningExecutions("loopJob").size());
logger.debug(launcher.getSummary(resumedId));
long resumeId2 = launcher.restart(resumedId);
assertNotSame("Picked up the same execution after pause and resume", executionId, resumeId2);
@@ -131,6 +133,8 @@ public class RemoteLauncherTests {
JobRegistryBackgroundJobRunner.main("adhoc-job-launcher-context.xml", "jobs/adhocLoopJob.xml");
}
catch (Exception e) {
// e.printStackTrace();
logger.error(e);
errors.add(e);
}
}