Here's another test that had an assumption that the threads would terminate within a 10 second window. On a busy or slow machine this limit may not be sufficient. Since the jtreg harness uses 120 second default value for terminating a test, the test should not be more restrictive.
http://cr.openjdk.java.net/~gadams/6776144/