On Sat, 12 Nov 2022 14:48:09 GMT, Kevin Rushforth <[email protected]> wrote:
>> 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.
>
> tests/system/src/test/java/test/javafx/embed/swing/SwingNodeDnDMemoryLeakTest.java
> line 52:
>
>> 50: public class SwingNodeDnDMemoryLeakTest {
>> 51:
>> 52: final static int TOTAL_SWINGNODE = 5;
>
> I don't think this change is necessary. The test will take no more time with
> 10 nodes than it will with 5, since the GC loop with the sleep is not
> dependent on the number of nodes.
OK. I will revert this change.
-------------
PR: https://git.openjdk.org/jfx/pull/946