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 MP Telemetry TCks with early access (pre-release) versions of Java, 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)
...

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 has the fix in awaitility/awaitility#279, now we just need to include 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