RFR: 8274606: Fix jaxp/javax/xml/jaxp/unittest/transform/SurrogateTest.java test
Aleksey Shipilev
shade at openjdk.java.net
Fri Oct 1 09:32:31 UTC 2021
On Thu, 30 Sep 2021 18:32:17 GMT, Alex Kasko <akasko at openjdk.org> wrote:
> I was working on backporting JDK-8268457 and found minor problems with the test introduced there:
>
> 1. `compareWith*` helper methods are used without `Assert.assertTrue()` wrapping, so they are effectively ignored
>
> 2. `this.getClass().getResourceAsStream()` is used to load test input data, it actually returns null in test run, so transformation is done without input data
>
> Note, that SurrogateTest.zip reproducer attached to JDK-8268457 is valid and fully functional, problems likely were introduced when it was adapted into test.
>
> The change is to the test only, it wraps `compareWith*` helpers and loads data the same way as XSL is loaded. Additionally `compareStringWithGold` was changed to `compareLinesWithGold` to exclude possible line endings problems.
>
> Testing: checked that the test fails when JDK-8268457 code fix is reverted, checked that is passes on master.
Looks fine to me.
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5779
More information about the core-libs-dev
mailing list