use of org.eclipse.scout.rt.platform.job.internal.CallableChainHandledException in project scout.rt by eclipse.
the class JobAsyncExceptionTest method testExceptionInCallable.
@Test(expected = PlatformException.class)
public void testExceptionInCallable() throws Exception {
P_JobManager jobManager = new P_JobManager();
IFuture<Void> future = jobManager.schedule(new IRunnable() {
@Override
public void run() throws Exception {
throw new PlatformException("Expected test exception");
}
}, Jobs.newInput().withRunContext(RunContexts.copyCurrent()));
future.awaitDone();
Assert.assertTrue(jobManager.e1 instanceof PlatformException);
Assert.assertTrue(jobManager.e2 instanceof CallableChainHandledException);
Assert.assertTrue(jobManager.e3 instanceof PlatformException);
}
Aggregations