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

Locales Some integration test fails with GraalVM for JDK 24 #43436

Closed
zakkak opened this issue Sep 23, 2024 · 6 comments · Fixed by #43448
Closed

Locales Some integration test fails with GraalVM for JDK 24 #43436

zakkak opened this issue Sep 23, 2024 · 6 comments · Fixed by #43448
Assignees
Labels
area/native-image kind/bug Something isn't working
Milestone

Comments

@zakkak
Copy link
Contributor

zakkak commented Sep 23, 2024

Describe the bug

Starting with GraalVM for JDK 24 (24.2) native image will no longer set the locale default at build time. See oracle/graal#9694. This apparently breaks the Locale Some integration test of Quarkus.

See graalvm/mandrel#755 (comment)

Expected behavior

The test should pass

Actual behavior

The test fails with errors like the following:

 Error:  Tests run: 20, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 6.895 s <<< FAILURE! -- in io.quarkus.locales.it.LocalesIT
Error:  io.quarkus.locales.it.LocalesIT.testCurrencies(String, String, String)[3] -- Time elapsed: 0.033 s <<< FAILURE!
java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.
Expected: is "česká koruna"
  Actual: Czech Republic Koruna

See https://github.com/graalvm/mandrel/actions/runs/10985696189/job/30498542041#step:12:3093

How to Reproduce?

  1. Build GraalVM for JDK 24
  2. Run locales/some integration test in native mode

Output of uname -a or ver

No response

Output of java -version

No response

Mandrel or GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

The regression is introduced by oracle/graal#9694

@zakkak zakkak added kind/bug Something isn't working area/native-image labels Sep 23, 2024
Copy link

quarkus-bot bot commented Sep 23, 2024

/cc @Karm (mandrel), @galderz (mandrel)

@jerboaa
Copy link
Contributor

jerboaa commented Sep 23, 2024

The regression is introduced by oracle/graal#9694

I came to the same conclusion (noticed it too late). Why is this being tracked as a quarkus issue?

@zakkak
Copy link
Contributor Author

zakkak commented Sep 23, 2024

Because Quarkus assumes build-time fixed locales and needs some adaptation (working on it) to support the new runtime locales.

@zakkak zakkak self-assigned this Sep 23, 2024
@jerboaa
Copy link
Contributor

jerboaa commented Sep 23, 2024

Because Quarkus assumes build-time fixed locales and needs some adaptation (working on it) to support the new runtime locales.

That would be useful info to have in the ticket. Thanks!

@zakkak
Copy link
Contributor Author

zakkak commented Sep 23, 2024

That would be useful info to have in the ticket. Thanks!

Turns out it was simpler than I expected :)

More details in #43448

@jerboaa
Copy link
Contributor

jerboaa commented Sep 24, 2024

Let me add some explanation to this issue for posterity.

Prior GraalVM for JDK 24 (currently EA), the default locale for the native image at runtime was determined at native image build time (set by -Duser.language=X -Duser.country=Y). With GraalVM for JDK 24 this now changes and behaves similar to how java behaves. That is, the default locale can get set by passing -Duser.language=X -Duser.country=Y to the generated native image at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants