RFR: 8376038: Refactor java/sql tests to use JUnit [v4]
Justin Lu
jlu at openjdk.org
Wed Jan 28 23:34:39 UTC 2026
On Wed, 28 Jan 2026 23:29:43 GMT, Justin Lu <jlu at openjdk.org> wrote:
>> Please review this PR which converts the JDBC TestNG tests to use JUnit.
>>
>> This is mainly done using the automated tool in https://github.com/openjdk/jdk/commit/0cec3097aec02e72ccb6ebbf0b2b046220578d1b, with some manual follow up commits. The testng folder is migrated to junit with the TEST.properties updated as well. Most changes are annotation updates and switching from testNG imports to JUnit. I decided to simplify cases of `BaseTest.trueFalse()` to use booleans in a `ValueSource` directly in https://github.com/openjdk/jdk/commit/757e7966666d39748db2912b32ccf8b1df18bd62.
>>
>> Framework test stats before:
>> 680 = 680 TestNG + 0 JUnit
>>
>> Framework test stats after:
>> 680 = 0 TestNG + 680 JUnit
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>
> Another occurrence of eof newline required
After the latest batch of commits, all tests under _java/sql_ and _javax/sql_ are now JUnit based tests. The respective _junit_ subdirs were removed as well, and all tests were consolidated.
Regarding java/sql,
https://github.com/openjdk/jdk/pull/29354/changes/a7fed7af952e61e62cd80b3526d3e100249c1f53 grouped _test/jdk/java/sql/driverModuleTests/DriverManagerModuleTests.java_ and _test/jdk/java/sql/junit/test/sql/othervm/DriverManagerInitTests.java_ under a new _drivermanager_ folder and removed the previous _othervm_ folder. (Those test are still run in othervm mode as configured by their TEST.properties).
Regarding javax/sql,
- https://github.com/openjdk/jdk/pull/29354/changes/a32e4141fbcebf3cc29d6e359c219c8ed9ef009b converted and moved the contents of the non JUnit tests under _test/jdk/javax/sql/rowset/serial/_ into the existing JUnit tests under _test/jdk/javax/sql/test/rowset/serial/_.
- https://github.com/openjdk/jdk/pull/29354/changes/4118f44f60928261b33207b5ea0f4d7630264a91 grouped _test/jdk/javax/sql/resourceBundleTests/ValidateGetBundle.java_ and _test/jdk/javax/sql/junit/test/rowset/ValidateResourceBundleAccess.java_ into their own respective _resourcebundle_ folder.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29354#issuecomment-3814482975
More information about the core-libs-dev
mailing list