On Fri, 13 Mar 2026 18:01:03 GMT, David Beaumont <[email protected]> wrote:
>> Refactor tests in test/jaxp/javax/xml/jaxp/functional/javax/xml 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). >> >> 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. >> >> Finally, the move from "expected exceptions" on the whole test method to >> using `assertThrows` threw up a lot of issues where tests weren't testing >> what they claimed (the exception was not being thrown by the final statement >> in the test). For these tests I've simplified them (rewriting them entirely >> in some cases) but they now test what they claim to be testing and are much >> clearer about where assertions are made. >> >> However, because these tests affect the thrown exceptions in test method >> signatures, I ran a tidyup to remove all unused exceptions from method >> signatures (rather than spending hours manually removing the effected >> subset). > > David Beaumont has updated the pull request incrementally with one additional > commit since the last revision: > > Latest feedback changes. > > * More feedback > * Feedback changes @david-beaumont, LGTM. I'm assuming `test/jaxp/javax/xml/jaxp` passes on all supported platforms. ------------- Marked as reviewed by vyazici (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/30165#pullrequestreview-3946209939
