eclipse / microprofile-fault-tolerance

microprofile fault tolerance
Apache License 2.0
131 stars 64 forks source link

MPFT TCK will need to use an updated version of awaitility for early access Java versions #647

Closed gjwatts closed 1 month ago

gjwatts commented 3 months ago

Describe the bug When running the latest MPFT TCK with early access (pre-release) versions of Java 23, we hit the following stacktrace:

testCancelWithoutInterrupt_EE10_FEATURES_MicroProfile_70:java.lang.NumberFormatException: For input string: "23-ea"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:588)
at java.base/java.lang.Integer.parseInt(Integer.java:685)
at org.awaitility.core.JavaVersionDetector.getJavaMajorVersion(JavaVersionDetector.java:21)
at org.awaitility.core.LambdaErrorMessageGenerator.getLambdaDetectionClassName(LambdaErrorMessageGenerator.java:86)
at org.awaitility.core.LambdaErrorMessageGenerator.isLambdaClass(LambdaErrorMessageGenerator.java:30)
at org.awaitility.core.CallableHamcrestCondition.getCallableDescription(CallableHamcrestCondition.java:51)
at org.awaitility.core.AbstractHamcrestCondition.getMatchMessage(AbstractHamcrestCondition.java:68)
at org.awaitility.core.AbstractHamcrestCondition.lambda$new$0(AbstractHamcrestCondition.java:51)
at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1575)

since the pre-GA builds of Java 23 have appended -ea to the Java version that gets reported back in System.getProperty("java.version"). When that happens, a NumberFormatException is thrown in JavaVersionDetector because the -ea part cannot be turned into a number (for obvious reasons).

The root failure has been reported to awaitility, so once that bug is fixed, then the MPFT TCK will need to be updated to use the fixed version of awaitility for testing with early access versions of Java.

gjwatts commented 3 months ago

FYI, the fix for this in awaitility should be fixed in PR -> https://github.com/awaitility/awaitility/pull/279

artur-ciocanu commented 3 months ago

@gjwatts the fix has been released, check it here: https://mvnrepository.com/artifact/org.awaitility/awaitility/4.2.2.

gjwatts commented 2 months ago

Thanks for pointing that out @artur-ciocanu