On Wed, 11 Mar 2026 15:31:18 GMT, David Beaumont <[email protected]> wrote:

> Refactor remaining tests in test/jaxp/javax/xml/jaxp/functional to use junit, 
> along with ancillary utilities and a handful of related tests elsewhere.
> 
> The difficulty in these refactorings is the use of common utilities which 
> themselves depend on TestNG classes, which are not available when running 
> JUnit tests. Thus, several bits of functionality in utility classes (esp. 
> classes in jaxp.library) has had to be re-implemented and inlined. This isn't 
> terrible, since most of these were one line functions (or complex functions 
> which could be replaced with one line).
> 
> The only exception to this are the handful of tests using 
> `compareDocumentWithGold` which is too large to justify inlining.
> 
> 
> test/jaxp/javax/xml/jaxp/functional/org/xml/sax/ptests/SAXParserNSTableTest.java
> test/jaxp/javax/xml/jaxp/functional/test/auctionportal/UserController.java
> test/jaxp/javax/xml/jaxp/functional/test/gaptest/Bug4693341.java
> 
> 
> These tests can be converted at the end when the utility class itself can be 
> refactored.
> 
> Another complexity is accounting for the differences in test lifecycle 
> management between TestNG and JUnit. A few classes needed to exploit the 
> lifecycle and execution modes for single setup and single threaded operation.

This pull request has now been integrated.

Changeset: 50f81c5d
Author:    David Beaumont <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/50f81c5d7c72c3085b076f897bd6608a4c016013
Stats:     1570 lines in 57 files changed: 440 ins; 430 del; 700 mod

8379798: Refactor remaining tests in javax/xml/jaxp/functional to JUnit

Reviewed-by: joehw

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

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

Reply via email to