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");
  }
}

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" ) ; } }
waits out termination of a thread pool or fails doing so .
