[crac] RFR: Convert CRaC tests from shell scripts to Java
Anton Kozlov
akozlov at openjdk.org
Thu Mar 2 16:52:53 UTC 2023
On Fri, 24 Feb 2023 09:20:05 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.
This looks very nice! While this is a draft, what should be especially looked? As an approach, this is what these tests were missing!
test/jdk/jdk/crac/LazyProps.java line 37:
> 35: public static void main(String[] args) throws Exception {
> 36: CracTest.run(LazyProps.class, args);
> 37: }
I assume this is the pattern that every test should be following. Is it possible to avoid this boiler plate by e.g.
@run driver CracTest LazyProps
and by making CracTest.main to look for the class?
test/jdk/jdk/crac/LazyProps.java line 41:
> 39: @Override
> 40: public void test() throws Exception {
> 41: new CracBuilder().engine(CracEngine.SIMULATE).main(LazyProps.class).args(CracTest.args())
`main(LazyProps.class).args(CracTest.args())` seems to be repeated, would it harm to make them default?
test/jdk/jdk/crac/LazyProps.java line 42:
> 40: public void test() throws Exception {
> 41: new CracBuilder().engine(CracEngine.SIMULATE).main(LazyProps.class).args(CracTest.args())
> 42: .captureOutput(true)
the same question, would it harm to make this default? Or is it false by default in the existing JDK testing libraries?
-------------
PR: https://git.openjdk.org/crac/pull/50
More information about the crac-dev
mailing list