RFR: 8296919: Make system tests that detect memory leaks more robust by using JMemoryBuddy utility [v5]
Kevin Rushforth
kcr at openjdk.org
Fri May 5 13:06:28 UTC 2023
On Fri, 5 May 2023 12:41:03 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:
>> tests/system/src/test/java/test/javafx/embed/swing/SwingNodeMemoryLeakTest.java line 80:
>>
>>> 78: });
>>> 79:
>>> 80: JMemoryBuddy.assertCollectable(weakRefArrSN);
>>
>> On my Mac (MacBook Pro x64 running macOS 13.2.1) I saw a one-time test failure here. So there might be a need to wait for the EDT to at least do something, possibly followed by a sleep (on the test thread, not on the EDT).
>
> Interesting, I will add a `runAndWait()` noop and a test thread sleep then.
I think you mean `SwingUtilities::invokeAndWait`, right?
Btw, I also got a similar one-time failure in `SwingNodeDnDMemoryLeakTest`, so perhaps the same could be added there?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1121#discussion_r1186070622
More information about the openjfx-dev
mailing list