RFR: 8373935: Migrate java/lang/invoke tests away from TestNG [v3]
Alan Bateman
alanb at openjdk.org
Fri Jan 23 09:46:16 UTC 2026
On Tue, 20 Jan 2026 23:55:02 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Refactor java/lang/invoke tests to use JUnit instead of TestNG.
>> This is done by:
>> 1. First a round of automatic conversion
>> 2. Simplify exception handling tests
>> 3. Replacing `assert` keyword and switching to better assertion APIs for equality etc.
>> 4. Some other random cleanups, such as module status
>>
>> Testing: java/lang/invoke on Linux-x64. I un-problemlisted the updated `java/lang/invoke/lambda/LambdaFileEncodingSerialization.java` too.
>
> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>
> - Another round of copyright year update
> - Various bugs
> - assertInstanceOf
> - loop test review, test instance cleanup
> - Use static imports
> - Merge branch 'master' of https://github.com/openjdk/jdk into cleanup/invoke-junit
> - Merge branch 'master' of https://github.com/openjdk/jdk into cleanup/invoke-junit
> - Review
> - Some omissions
> - Whitespace
> - ... and 2 more: https://git.openjdk.org/jdk/compare/aaca0a2c...b152f7ca
test/jdk/java/lang/invoke/AccessControlTest.java line 73:
> 71: this.lookupModes = lookup.lookupModes();
> 72:
> 73: assertEquals(lookupString(), lookup.toString());
Always amusing to see accidental usages like this. As the tests are run with -ea then it was actually effective, just not as intended.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28879#discussion_r2720469992
More information about the core-libs-dev
mailing list