On Thu, 9 Apr 2026 08:48:40 GMT, David Beaumont <[email protected]> wrote:

>> David Beaumont has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   one more assertion simplification
>
> test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java 
> line 106:
> 
>> 104:             }
>> 105: 
>> 106:         } catch (XMLStreamException e) {
> 
> This test was broken, and never got to any of the catch clauses. The implied 
> "expected" END_DOCUMENT never existed because the catch inside the loop 
> prevented these outer catches happening (and there was no "fail" in the main 
> try body).
> I can't be 100% sure what the original intent of this test was, but the new 
> test captures the real behavior more explicitly.

For complex tests I am wondering if it makes sense to (manually) check code 
coverage for the _test code_ itself, not only the code under test.

(Just a general thought though; I am not suggesting this should be done here 
for this PR or any of the other JUnit PRs. I also don't know if it is possible 
/ how difficult it is to run JDK tests with code coverage tools.)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30643#discussion_r3066427351

Reply via email to