RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795
Jonathan Gibbons
jjg at openjdk.java.net
Thu May 19 22:13:29 UTC 2022
Please review a test-only fix to make a recent new test more robust.
The test was not fundamentally broken, so the essential functionality remains the same. However, it does assume access to the `src/jdk.javadoc` directory, and crashed when that was not available.
The mitigation is two-fold:
1. introduce and use a new `SnippetUtils.ConfigurationException` that is thrown when the test cannot find the necessary directories.
2. introduce and use 2 new test-suite keywords, `needs-src` `needs-src-jdk_javadoc` that can be used on the jtreg command-line to filter out this test, and any similar tests in the future.
Tested locally, manually, by temporarily renaming key directories, to test the different code paths. In all cases, if the test is run and any necessary directories are missing, the test _will still fail_, but now with a more useful and specific exception and detail message.
-------------
Commit messages:
- JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795
Changes: https://git.openjdk.java.net/jdk/pull/8796/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8796&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8279513
Stats: 44 lines in 3 files changed: 37 ins; 0 del; 7 mod
Patch: https://git.openjdk.java.net/jdk/pull/8796.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8796/head:pull/8796
PR: https://git.openjdk.java.net/jdk/pull/8796
More information about the compiler-dev
mailing list