RFR: 8339510: [TestBug] Convert system tests to JUnit 5 [v4]

Kevin Rushforth kcr at openjdk.org
Fri Sep 20 15:12:45 UTC 2024


On Thu, 19 Sep 2024 22:37:00 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Converting system tests to junit5.
>> 
>> Please see migration notes:
>> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/Tests/JUnit5Migration.md
>> 
>> ### Notes:
>> 
>> I see shutdown timeout on linux, this will be addressed by [JDK-8340403](https://bugs.openjdk.org/browse/JDK-8340403)
>> 
>> QPathTest > executionError FAILED
>>     org.opentest4j.AssertionFailedError: Exceeded timeout limit of 10000 msec
>>         at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
>>         at app//org.junit.jupiter.api.Assertions.fail(Assertions.java:134)
>>         at app//test.util.Util.runAndWait(Util.java:156)
>>         at app//test.util.Util.runAndWait(Util.java:127)
>>         at app//test.util.Util.shutdown(Util.java:365)
>>         at app//test.com.sun.marlin.QPathTest.teardownOnce(QPathTest.java:146)
>> 
>> 
>> This test might fail intermittently (?) on linux only:
>> 
>> SetSceneScalingTest > testShowAndSetScene() FAILED
>>     org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
>>         at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>>         at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
>>         at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:35)
>>         at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:179)
>>         at app//test.robot.javafx.stage.SetSceneScalingTest$TestShowSetSceneApp.test(SetSceneScalingTest.java:129)
>>         at app//test.robot.javafx.stage.SetSceneScalingTest$TestApp.runTest(SetSceneScalingTest.java:89)
>>         at app//test.robot.javafx.stage.SetSceneScalingTest.testShowAndSetScene(SetSceneScalingTest.java:193)
>
> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rotate test

The changes you made look good. I still see some unexpected test failures in the (unstable) monocle tests suite. I ran the following command:


gradle --continue --info -PTEST_ONLY=true -PFULL_TEST=true -PUSE_ROBOT=true -PUNSTABLE_TEST=true :systemTests:test --tests "test.robot.com.sun.glass.ui.monocle*"


On master, I get:

1773 tests : 56 failures : 495 ignored

With this PR, I get:

1326 tests : 422 failures: 12 ignored

I note that we are actually running _more_ tests than before: `1773-495=1278` vs `1326-12=1314`

As for the failures, since this is an unstable set of tests, the ones that timeout aren't a concern; which ones fail may vary slightly from run to run so a small difference is OK. In this case, the number of additional failures is much higher than I would expect: 56 vs 422.

The ones that fail with an exception other than a timeout suggest a problem with the conversion of parameterized tests. See `InputDevicePropertyTest`, for one example. All 45 tests pass with master and all 45 fail with a "Toolkit not initialized" with this patch.

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

PR Review: https://git.openjdk.org/jfx/pull/1569#pullrequestreview-2318522627


More information about the openjfx-dev mailing list