Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some TCKs use a version of awaitility that does not handle early access versions of Java #30227

Open
gjwatts opened this issue Nov 19, 2024 · 0 comments · May be fixed by #30228
Open

Some TCKs use a version of awaitility that does not handle early access versions of Java #30227

gjwatts opened this issue Nov 19, 2024 · 0 comments · May be fixed by #30228

Comments

@gjwatts
Copy link
Member

gjwatts commented Nov 19, 2024

When running the latest MPFT and MPT TCKs with early access (pre-release) versions of Java, we hit the following stacktrace:

testAsyncDoubleCounter_EE11_FEATURES_MicroProfile_70:java.lang.NumberFormatException: For input string: "24-ea"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:564)
at java.base/java.lang.Integer.parseInt(Integer.java:661)
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.AssertionCondition.generateDescriptionPrefix(AssertionCondition.java:87)
at org.awaitility.core.AssertionCondition.getMatchMessage(AssertionCondition.java:73)
at org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:54)
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:328)
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:1447)
...

because pre-GA builds of Java 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).

Awaitility fixed this in PR awaitility/awaitility#279 and is included in awaitility 4.2.2, now we just need to include the newer version in these two TCKs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant