RFR: 8296919: Make system tests that detect memory leaks more robust by using JMemoryBuddy utility [v3]
Andy Goryachev
angorya at openjdk.org
Wed May 3 18:18:22 UTC 2023
On Wed, 3 May 2023 09:20:14 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:
>> Verified these changes on all platforms and saw no abnormalities in test execution.
>>
>> This change is based on a preliminary patch done by @aghaisas , with some minor changes and the addition of one Leak-related web test. EventListenerLeak test was not touched, as it is a separate manual test app instead of a JUnit test.
>
> Lukasz Kostyra has updated the pull request incrementally with one additional commit since the last revision:
>
> Minor review updates
>
> * Changed ArrayList<> to Collection<> in one of assertCollectable-s
> * Updated LeakTest to use new assertCollectable helpers
The changes look good!
Unfortunately, the project won't build in Eclipse due to
`The type test.util.memory.JMemoryBuddy is not accessible LeakTest.java /web/src/test/java/test/javafx/scene/web`
To fix that, could you please modify line 45 of modules/web/.classpath file to this (er, better include the whole file):
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/native/Source/WebCore/bindings/java/dom3/java"/>
<classpathentry kind="src" output="testbin" path="src/shims/java">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="testbin" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/main/resources">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="testbin" path="src/test/resources">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/media">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/controls">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/graphics">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/base">
<attributes>
<attribute name="module" value="true"/>
<attribute name="add-exports" value="javafx.base/com.sun.javafx=javafx.web:javafx.base/test.util.memory=javafx.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
<attribute name="add-reads" value="javafx.web=java.management"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1121#issuecomment-1533497773
More information about the openjfx-dev
mailing list