Skip to content

Instantly share code, notes, and snippets.

@tadas-subonis
Created April 23, 2013 21:51
Show Gist options
  • Save tadas-subonis/5447715 to your computer and use it in GitHub Desktop.
Save tadas-subonis/5447715 to your computer and use it in GitHub Desktop.
@Test
public void threadsShouldBePresentAfterTimeoutIfWeDontAllowThreadTimeout() throws Throwable {
threadPoolExecutor.allowCoreThreadTimeOut(false);
CountDownLatch untilAllThreadsDone = startaBunchOfThreads();
untilAllThreadsDone.await();
waitUntilTimeoutOccurs();
assertEquals(countExecutorThreads(), threadPoolSize);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment