jtreg tests can be improved:
- calls to sleep are occasionally necessary, but most should be eliminated. They make the tests slow and flaky.
- exceptions thrown during execution should always cause test failure, which is not currently the case
- some tests were originally ported from micro-benchmarks. Eliminate the "warmup" phase which is not sufficiently useful in a jtreg test.
- jtreg tests should never run more than about 1 second in normal execution mode. A "stress test mode" is a fine thing to have, but the invoker of jtreg should opt-in, and there should be some kind of standard as to how such tests should be run (I'm not aware of any prior art on that). It might be reasonable for a stress test to run until e.g. half of its allotted time is used up.