We are seeing some failures of this test in our CI, particularly on Windows 
machines, which are known to starve out certain threads.

To make sure the compiler threads get a chance to work, I've added `-Xbatch` to 
the flags with which the test runs (this was missed in the original PR). I've 
also removed the timeout from the `awaitCompilation` method. The intent is to 
instead rely on the overall test's timeout, which can also be adjusted with a 
timeout factor for slower machines, rather than putting an absolute time limit 
on the compilation.

Finally, Alan asked me to increase the timeout for the executor shutdown, since 
there have also been some timeouts there. The current timeout is borrowed from 
`test/jdk/java/foreign/TestHandshake`, but that test uses a lot less threads, 
so it can probably get await with waiting just 20 seconds.

Testing: I ran this 200s time in Oracle CI, half of the runs were with 
`-Duse.JTREG_TEST_THREAD_FACTORY=Virtual -XX:-VerifyContinuations` (which is 
one of the failing configurations).

-------------

Commit messages:
 - use -Xbatch + rely on test timeout

Changes: https://git.openjdk.org/jdk/pull/20325/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20325&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8337060
  Stats: 7 lines in 1 file changed: 1 ins; 5 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/20325.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20325/head:pull/20325

PR: https://git.openjdk.org/jdk/pull/20325

Reply via email to