RFR: 8274606: Fix jaxp/javax/xml/jaxp/unittest/transform/SurrogateTest.java test
Alex Kasko
akasko at openjdk.java.net
Thu Sep 30 18:40:56 UTC 2021
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.
-------------
Commit messages:
- 8274606: Fix jaxp/javax/xml/jaxp/unittest/transform/SurrogateTest.java test
Changes: https://git.openjdk.java.net/jdk/pull/5779/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5779&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274606
Stats: 10 lines in 1 file changed: 3 ins; 1 del; 6 mod
Patch: https://git.openjdk.java.net/jdk/pull/5779.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5779/head:pull/5779
PR: https://git.openjdk.java.net/jdk/pull/5779
More information about the core-libs-dev
mailing list