[crac] RFR: Convert CRaC tests from shell scripts to Java [v3]

Anton Kozlov akozlov at openjdk.org
Fri Mar 10 09:15:00 UTC 2023


On Tue, 7 Mar 2023 14:49:27 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> Right now this is a draft as it builds on top of https://github.com/openjdk/crac/pull/47
>> 
>> Please see `CracTest` javadoc for detailed info.
>
> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove forgotten debugging command

test/jdk/jdk/crac/JarFileFactoryCacheTest/JarFileFactoryCacheTest.java line 61:

> 59:             }
> 60:             assert temp.toFile().delete();
> 61:         }

Looks fine, although not very expected. The test is adjusted to generate the text file, so it is also deleted after the jar is generated.

A nit: probably `temp.resolve("test.txt")` worth to be computed once.

test/jdk/jdk/crac/SecureRandom/InterlockTest.java line 119:

> 117:     public static void main(String[] args) throws Exception {
> 118:         CracTest.run(InterlockTest.class, args);
> 119:     }

Is it a leftover that can be deleted, or do we need to help CracTest to find the test class in this test?

test/jdk/jdk/crac/Selector/Test970/ChannelResource.java line 34:

> 32:     public enum SelectionType {SELECT, SELECT_TIMEOUT, SELECT_NOW}
> 33: 
> 34:     ;

Something wrong with formatting here

test/jdk/jdk/crac/Selector/Test970/ChannelResource.java line 57:

> 55:     }
> 56: 
> 57:     @java.lang.Override

Maybe just `@Override`?

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

PR: https://git.openjdk.org/crac/pull/50


More information about the crac-dev mailing list