assertThat(exception[1].getMessage(), containsString("Appears to be stuck in thread timeout-thr2"));
}
@Test
public void timeoutFailureMultithreadedStuckInMain() throws Exception {
JUnitCore core = new JUnitCore();
Result result = core.run(InfiniteLoopStuckInMainThreadTest.class);
assertEquals(1, result.getRunCount());
assertEquals(1, result.getFailureCount());
Throwable exception = result.getFailures().get(0).getException();
assertThat(exception.getMessage(), containsString("test timed out after 100 milliseconds"));
assertThat(exception.getMessage(), not(containsString("Appears to be stuck")));