question: public void joinPool ( ExecutorService exec ) { try { exec . shutdown ( ) ; assertTrue ( "ExecutorService did not terminate in a timely manner" , exec . awaitTermination ( 2 * LONG_DELAY_MS , MILLISECONDS ) ) ; } catch ( SecurityException ok ) { } catch ( InterruptedException ie ) { fail ( "Unexpected InterruptedException" ) ; } }
target:  Waits out termination of a thread pool or fails doing so.