Root cause: The test unreliability comes from the 250ms sleep between 
`System.gc()` calls.
Other system tests such as `TabPaneHeaderLeakTest`, 
`AccordionTitlePaneLeakTest` and `ShapeViewOrderLeakTest` etc sleep for 500ms 
between `System.gc()` calls.

Fix:
- Increased the sleep time to 500ms between `System.gc()` calls.
- Reduced the number of SwingNodes by half as an additional step towards making 
the test lighter.

Testing: This test used to fail on my macBook all the time if ran as part of a 
full system test run. I executed full test runs 5 times with above changes and 
no failure was observed.

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

Commit messages:
 - Fix 8285503

Changes: https://git.openjdk.org/jfx/pull/946/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=946&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8285503
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/946.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/946/head:pull/946

PR: https://git.openjdk.org/jfx/pull/946

Reply via email to