Created
April 23, 2013 21:58
-
-
Save tadas-subonis/5447772 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ThreadPoolExecutor threadPoolExecutor; | |
@BeforeMethod | |
void setUp() { | |
threadPoolExecutor = prepareThreadPoolExecutor(); | |
} | |
@AfterMethod | |
void tearDown() throws InterruptedException { | |
threadPoolExecutor.shutdown(); | |
while (!threadPoolExecutor.isTerminated()) { | |
Thread.sleep(20); | |
} | |
/* | |
* Clean up our threadpool | |
*/ | |
assertTrue(threadPoolExecutor.awaitTermination(10, TimeUnit.SECONDS)); | |
threadPoolExecutor = null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment