RFR(s): 8171958: Several tests from java/time/test/java/time/format requiring jdk.localedata for execution

Sergei Kovalev sergei.kovalev at oracle.com
Wed Dec 28 14:20:09 UTC 2016

Hi Rachna,

Thank you for the comment. I've reviewed usage of module declaration in 
TEST.properties file and find that it could be removed without any 
impact. In both cases (with original and modified TEST.properties file) 
I get same result.

Test results: passed: 142; failed: 27

The reason of this behavior is the lack of jtreg header in test sources. 
In case test source has no "@test" tag jtreg ignores all properties that 
exists in TEST.properties file.

I recreated the review by adding TEST.properties modification: 

27.12.16 13:55, Rachna Goel wrote:
> Hi Sergei,
> Though I am not a reviewer, But I have one comment on this fix.
> test/java/time/TEST.properties declares "modules = jdk.localedata" , 
> so that all tests for java.time can have access to "jdk.localedata" 
> module.
> If we are restricting usage of jdk.localedata module for different 
> tests, then TEST.properties need to be updated as well.
> Thanks,
> Rachna
> On 26/12/16 8:27 PM, Sergei Kovalev wrote:
>> Hello Team,
>> Please review below fix for tests.
>> Bug ID: https://bugs.openjdk.java.net/browse/JDK-8171958
>> Web review: http://cr.openjdk.java.net/~skovalev/8171958/webrev.00/
>> Issue: some tests fails in case of module limitation by 
>> '--limit-module java.base' command line option.
>> Root cause: The tests uses locale data that stored in separate 
>> resource file "jdk.localedata".
>> Solution: Add declaration of required module. In same cases a test 
>> file contains many test items, part of which could be executed with 
>> java.base module only. In this cases we can separate the items and 
>> extract that items which depend on locale data and run them 
>> individually. Therefore this proposal contains additional test files 
>> where added "WithLocale" suffix which demonstrate dependency on 
>> resources. Alternative solution could be add a required module 
>> declaration "jdk.localedata" to all files. However this will lead to 
>> unnecessary test coverage reduction.

With best regards,

More information about the core-libs-dev mailing list