RFR: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable

Sergey Bylokhov serb at openjdk.java.net
Tue Jun 7 05:19:39 UTC 2022


This is an update of the test which was de-problemlisted [here](https://github.com/openjdk/jdk/pull/8450).

Looks like the initial root cause of the issue was related to the last disposed frame which for some reason was not deleted from the memory, for that issue, the [next](https://bugs.openjdk.org/browse/JDK-8287707) bug was reported.
But that change also replaced the usage of weak references by the Runtime.getRuntime().freeMemory() which is not stable enough to verify the leak - its return values vary a lot.

This change returns the usage of weak references and tests only one instance of TitledBorder which is enough to verify the old [bug](https://bugs.openjdk.org/browse/JDK-8204963).

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

Commit messages:
 - Update TestTitledBorderLeak.java
 - 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable

Changes: https://git.openjdk.java.net/jdk/pull/9051/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9051&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8287876
  Stats: 37 lines in 1 file changed: 7 ins; 6 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk/pull/9051.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/9051/head:pull/9051

PR: https://git.openjdk.java.net/jdk/pull/9051



More information about the client-libs-dev mailing list