RFR: 8373913: Refactor serialization tests to use JUnit

Alan Bateman alanb at openjdk.org
Thu Dec 18 13:36:59 UTC 2025


On Wed, 17 Dec 2025 21:16:49 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Refactor serialization tests to use JUnit.
>> Automated conversion for most annotations.
>> Conditional tests are refactored to use JUnit Enable/DisableIf.
>
> test/jdk/java/io/Serializable/class/NonSerializableTest.java line 104:
> 
>> 102:     @ParameterizedTest
>> 103:     @MethodSource("provider")
>> 104:     public void test(String[][] argArray) throws Exception {
> 
> I recommend changing `provider` to return `List<String[]>` or `Object[]`, instead of hacking the test.

`Stream<Arguments>` is another option, at least I've found it useful for the method sources like this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28877#discussion_r2631129391


More information about the core-libs-dev mailing list