Even though the test passes, it throws an unexpected exception:
Exception in thread "" java.lang.NullPointerException: Cannot invoke "jdk.jpackage.test.TestInstance.notifyAssert()" because the return value of "jdk.jpackage.test.TKit.currentTest()" is null
at jdk.jpackage.test.TKit.assertEquals(TKit.java:679)
at jdk.jpackage.test.Executor$Result.assertExitCodeIs(Executor.java:284)
at jdk.jpackage.test.Executor$Result.assertExitCodeIs(Executor.java:273)
at jdk.jpackage.test.Executor.execute(Executor.java:329)
at jdk.jpackage.test.HelloApp.execute(HelloApp.java:520)
at jdk.jpackage.test.HelloApp.configureAndExecute(HelloApp.java:510)
at Win8365790Test.lambda$runLauncher$0(Win8365790Test.java:105)
at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)
This is a regression fromJDK-8370136 patch.
The issue remained unnoticed as it didn't fail the test. It occurs in the auxiliary thread after it successfully executes the workload, and there is no exception check in the main thread.
Rework the test to prevent the exception from being thrown, and such that if any exception occurs in the auxiliary thread, it would fail the test.
Exception in thread "" java.lang.NullPointerException: Cannot invoke "jdk.jpackage.test.TestInstance.notifyAssert()" because the return value of "jdk.jpackage.test.TKit.currentTest()" is null
at jdk.jpackage.test.TKit.assertEquals(TKit.java:679)
at jdk.jpackage.test.Executor$Result.assertExitCodeIs(Executor.java:284)
at jdk.jpackage.test.Executor$Result.assertExitCodeIs(Executor.java:273)
at jdk.jpackage.test.Executor.execute(Executor.java:329)
at jdk.jpackage.test.HelloApp.execute(HelloApp.java:520)
at jdk.jpackage.test.HelloApp.configureAndExecute(HelloApp.java:510)
at Win8365790Test.lambda$runLauncher$0(Win8365790Test.java:105)
at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)
This is a regression from
The issue remained unnoticed as it didn't fail the test. It occurs in the auxiliary thread after it successfully executes the workload, and there is no exception check in the main thread.
Rework the test to prevent the exception from being thrown, and such that if any exception occurs in the auxiliary thread, it would fail the test.
- caused by
-
JDK-8370136 Support async execution of jpackage tests
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/87df1bbb
-
Review(master)
openjdk/jdk/29642