Skip to content

Commit 2fcca6c

Browse files
committed
add a cancel job when timeout occurs
1 parent 1929ddc commit 2fcca6c

File tree

1 file changed

+8
-1
lines changed
  • framework/xdsml_framework/tests/org.eclipse.gemoc.xdsmlframework.test.lib/src/org/eclipse/gemoc/xdsmlframework/test/lib

1 file changed

+8
-1
lines changed

framework/xdsml_framework/tests/org.eclipse.gemoc.xdsmlframework.test.lib/src/org/eclipse/gemoc/xdsmlframework/test/lib/WorkspaceTestHelper.xtend

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class WorkspaceTestHelper {
257257
}
258258

259259
/**
260-
* Creates and lauches a new run configuration for {@link project}
260+
* Creates and launches a new run configuration for {@link project}
261261
* using {@link mainClass} as the main Java class.
262262
*
263263
* @return the produced console output
@@ -459,6 +459,13 @@ class WorkspaceTestHelper {
459459
delay(delay);
460460
retry = retry - 1
461461
if(retry <= 0) {
462+
println("waitForJobs timed out after " + delay * 600 + "ms")
463+
println("[waitForJobs] CANCELLING all jobs ")
464+
val jobs = Job.getJobManager().find(null)
465+
for (job : jobs) {
466+
println("[waitForJobs] CANCELLING job "+job.name+ " (rule="+job.rule+")")
467+
job.cancel
468+
}
462469
throw new InterruptedException("waitForJobs timed out after " + delay * 600 + "ms")
463470
}
464471
}

0 commit comments

Comments
 (0)