On Fri, 7 Aug 2026 14:39:42 GMT, Shiv Shah <[email protected]> wrote:

>> test/failure_handler/test/unit/jdk/test/failurehandler/HtmlSectionTest.java 
>> line 27:
>> 
>>> 25: 
>>> 26: import org.junit.Assert;
>>> 27: import org.junit.Test;
>> 
>> This looks like an outdated version of JUnit. Several parts of the JDK use 
>> JUnit 5 (through jtreg). I don't see any jtreg test tag definitions on this 
>> test either. How are these failure handler tests launched?
>
> the unit tests in this dir don’t have jtreg headers, the existing ones like 
> DefaultParserTest are plain junit 4, so I matched that. the failure handler 
> builds into the test image, and there’s a manual test-failure-handler make 
> target that runs jtreg over test/failure_handler/test with the built jar as 
> the timeout handler and that covers the sanity tests but skips these unit 
> classes since they have no @test tags, so they’re run manually. I ran them 
> directly with junit 4.13.2 and they pass

Looking at the `test` target in `make/test/BuildFailureHandler.gmk` it seems to 
be launching jtreg to run tests. And (as you note) there are no jtreg tests nor 
do I see any configuration which would consider this directory as a junit test 
directory 
https://openjdk.org/jtreg/faq.html#how-does-jtreg-support-testng-and-junit-tests.
 So it looks like this will need some additional look at some later date.

I haven't looked too closely at this new test, but it seems OK.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32157#discussion_r3737023892

Reply via email to