RFR: JDK-8279513: jdk/javadoc/doclet/testDocletExample/TestDocletExample.java fails after 8278795

Pavel Rappo prappo at openjdk.java.net
Wed May 25 17:27:46 UTC 2022


On Thu, 19 May 2022 22:05:50 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> 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.

> I'd prefer to leave updates to SnippetIUtils to its own separate Enhancement.

Sounds good.

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

Marked as reviewed by prappo (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8796


More information about the compiler-dev mailing list