RFR: 8376038: Refactor java/sql tests to use JUnit [v2]

Justin Lu jlu at openjdk.org
Tue Jan 27 17:41:35 UTC 2026


> 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 11 additional commits since the last revision:

 - clean up some of the statement lambdas
 - use static imports for assertions
 - TestInstance cleanup -> Base test remains PER_CLASS (as needed), child classes remove redundant annotations
 - Convert testNG Object[][] style data providers to Stream
 - Convert test/jdk/java/sql/junit/test/sql/ param tests to ensure original semantics
 - Resolve errors stemming from JUnit auto-closeable resolution
 - Resolve undetected BaseTest data providers
 - Resolve no automated replacement for assertEqualsNoOrder
 - Apply automated conversion to javax/sql and update testng to junit naming for folder & properties
 - Refactor JavatimeTest.java to use JUnit and migrate under junit folder
 - ... and 1 more: https://git.openjdk.org/jdk/compare/8ba8213f...06098254

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29354/files
  - new: https://git.openjdk.org/jdk/pull/29354/files/8ba8213f..06098254

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29354&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29354&range=00-01

  Stats: 14766 lines in 88 files changed: 7375 ins; 6972 del; 419 mod
  Patch: https://git.openjdk.org/jdk/pull/29354.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29354/head:pull/29354

PR: https://git.openjdk.org/jdk/pull/29354


More information about the core-libs-dev mailing list