HandlersOnComplexResetUpdate and HandlersOnComplexUpdate tests verify that 
loggers are GC'ed (or not GC'ed) after a reset or an update. For that they poll 
a ReferenceQueue in a loop. The number of iteration is adjusted according to 
the jtreg timeout factor. However, the logic in the test did not expect that 
the timeout might be less than 1.

This fix does two things:

1. fix the adjustCount logic - so that the number of iteration can only be 
increased
2. use remove(timeout) instead of poll() in order to minimize the waiting time.

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

Commit messages:
 - 8333270

Changes: https://git.openjdk.org/jdk/pull/19503/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19503&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8333270
  Stats: 11 lines in 2 files changed: 0 ins; 2 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/19503.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19503/head:pull/19503

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

Reply via email to