RFR: 8266461: tools/jmod/hashes/HashesTest.java fails: static @Test methods

Mandy Chung mchung at openjdk.java.net
Thu May 13 17:01:55 UTC 2021


On Thu, 13 May 2021 10:49:21 GMT, Lance Andersen <lancea at openjdk.org> wrote:

> HI all,
> 
> Please review the fix to HashesTest.java to support running on TestNG 7.4.  
> 
> The fix adds a no-arg constructor which TestNG requires.
> 
> The change allows the test to run with the current jtreg as well as the upcoming jtreg
> 
> 
> Best
> Lance

I also think it's good to fix this properly.    Each test wants to run in an unique directory.    Another solution is to make the fields non-final and add a new `@BeforeMethod` method to generate the unique pathname for each test.   I think this seems a clean way (I sent you a patch to checkout).

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

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


More information about the core-libs-dev mailing list