[jdk17u-dev] RFR: 8286045: Use ForceGC for cleaner test cases
Andrew John Hughes
andrew at openjdk.org
Sat Nov 25 18:50:28 UTC 2023
[JDK-8286045](https://bugs.openjdk.org/browse/JDK-8286045) is a test fix which aims to make GC usage within test cases more reliable by using the `ForceGC` library added by [JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358).
It adjusts three test cases:
* `test/jdk/javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java`
* `test/jdk/sun/security/jgss/GssContextCleanup.java`
* `test/jdk/sun/security/jgss/GssNameCleanup.java`
The two `jgss` tests are introduced by a finalization cleanup, [JDK-8284490](https://bugs.openjdk.org/browse/JDK-8284490): "Remove finalizer method in java.security.jgss", which is not in 17u, so this backport only includes the changes to `CheckCleanerBound.java`, which was introduced in the 2023-10 security update.
The changes to `CheckCleanerBound.java` apply cleanly, but the test still fails as `CheckCleanerBound.java` never received the changes in the backport of [JDK-8285796](https://bugs.openjdk.org/browse/JDK-8285796) as this backport was introduced in 17u about a week before `CheckCleanerBound.java`. With that additional fragment cherry-picked from the trunk version of 8285796, the test passes.
Finally, we drop the `ProblemList.txt` addition made by [JDK-8285785](https://bugs.openjdk.org/browse/JDK-8285785) as the test now passes.
-------------
Commit messages:
- Revert ProblemList.txt addition for CheckCleanerBound made by 8285785
- Add CheckCleanerBound.java fragment of 8287596
- Backport 7eb15593e18a923bbc18c8d596cff87d87019640
Changes: https://git.openjdk.org/jdk17u-dev/pull/1987/files
Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=1987&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8286045
Stats: 18 lines in 2 files changed: 5 ins; 10 del; 3 mod
Patch: https://git.openjdk.org/jdk17u-dev/pull/1987.diff
Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/1987/head:pull/1987
PR: https://git.openjdk.org/jdk17u-dev/pull/1987
More information about the jdk-updates-dev
mailing list