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

Adapt locales support for GraalVM >= 24.2 #43448

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Sep 23, 2024

Starting with GraalVM for JDK 24 (24.2) native image will no longer set the locale default at build time. As a result, the default locale won't be included by default in the native image unless explicitly specified and it will also not be set implicitly.

As discussed in #43533 (reply in thread) this PR updates the locales support so that:

  • if neither quarkus.locales nor quarkus.default-locale is set, the Quarkus applications should default to English (en_US), instead of the build systems locale (which is the current behavior), at run-time.
  • if quarkus.default-locale is set but quarkus.locales is not set, then we should only include the locale quarkus.default-locale is set to. This is the current behavior with GraalVM for JDK 21.
  • if both quarkus.default-locale and quarkus.locales are set, then we should include only the locales from quarkus.locales and the one from quarkus.default-locale (this is the current behavior).
  • if quarkus.locales is set but quarkus.default-locale is not set, then we should include only the locales from quarkus.locales and default to English, instead of the build systems locale (which is the current behavior), at run-time (similarly to point 1).
  • if quarkus.default-locale (which is build time fixed) is set, it is used to set the default user.language and user.country values at run-time, while users may still override them.

For points 2 and 3 starting with graalVM for JDK 24 we will also include en_US which shouldn't be a big issue as mentioned in #43533 (reply in thread),

Caution

Point 1 changes the current behavior, meaning we need to clearly document and communicate it.

The PR also updates the Locales integration tests accordingly.

See oracle/graal#9694

Closes #43436

Depends on #43696

This comment has been minimized.

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Should we amend the doc in LocalesBuildTimeConfig for defaultLocale. It currently mentions:

quarkus.default-locale

Default locale that can be consumed by the extensions.
The locale must be specified in the IETF BCP 47 format e.g. en-US or fr-FR.
For instance, the Hibernate Validator extension makes use of it.
Native-image build uses this property to derive user.language and user.country for the application’s runtime.

See: https://quarkus.io/guides/all-config

@zakkak
Copy link
Contributor Author

zakkak commented Sep 23, 2024

Good point. I will update the doc and fix the style issue tomorrow.

@zakkak
Copy link
Contributor Author

zakkak commented Sep 24, 2024

Good point. I will update the doc and fix the style issue tomorrow.

Done, I also ended up moving the changes in core/deployment/src/main/java/io/quarkus/deployment/steps/LocaleProcessor.java where they seem to belong. Please have another look.

@@ -44,7 +44,8 @@ public class LocalesBuildTimeConfig {
* For instance, the Hibernate Validator extension makes use of it.
* <p>
* Native-image build uses this property to derive {@code user.language} and {@code user.country} for the application's
* runtime.
* runtime. Starting with GraalVM for JDK 24 this option will not result in setting the default runtime locale, and
* any usages of it should be re-evaluated.
*/
@ConfigItem(defaultValue = DEFAULT_LANGUAGE + "-" + DEFAULT_COUNTRY, defaultValueDocumentation = "Build system locale")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultValueDocumentation is:

  • Build system locale (prior GraalVM for JDK 24)
  • System default locale at image runtime with GraalVM for JDK 24 and better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • System default locale at image runtime with GraalVM for JDK 24 and better

Note that this is not enforced though, i.e., if we compile with -Dquarkus.default-locale=cs-CZ we will still have to pass -Duser.language=cs and/or -Duser.country=CZ at runtime. Note that passing -Dquarkus.default-locale=cs-CZ won't do the trick as it's considered build-time fixed, which I guess I need to fix as well.

I added a new test for this ^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsmet any suggestions on how to approach this? To my understanding quarkus.default-locale should move to RUN_TIME config phase starting with GraalVM for JDK 24.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, I'm not sure we have a good way to achieve that. We moved some build time properties to runtime but it was an all or nothing thing.

I think we will have to keep it build time until we officially switch to a GraalVM/Mandrel version that is 24+.

Except if @radcortez comes up with some crazy ideas but I'm not entirely sure it's worth the hassle if we can live with it for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mappings allow you to map the same property for both build and runtime. It can either be done by another mapping, or just by registering the LocalesBuildTimeConfig in the runtime config customizer.

We had a similar case with logging:
#42157

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • System default locale at image runtime with GraalVM for JDK 24 and better

Note that this is not enforced though, i.e., if we compile with -Dquarkus.default-locale=cs-CZ we will still have to pass -Duser.language=cs and/or -Duser.country=CZ at runtime. Note that passing -Dquarkus.default-locale=cs-CZ won't do the trick as it's considered build-time fixed, which I guess I need to fix as well.

I added a new test for this ^

I'm not sure I follow. What I meant is that the native image follows the system locale at runtime. Yeah it's no longer build-time static (the default locale). For latest GraalVM master I see this. Test with Locale.getDefault() in a native image.

On de-AT locale:

$ localectl status
System Locale: LANG=de_AT.UTF-8
    VC Keymap: us
   X11 Layout: us
    X11 Model: pc105
$ ./locale-test-24 
Default locale: de_AT

On en-US locale:

$ localectl status
System Locale: LANG=en_US.UTF-8
    VC Keymap: us
   X11 Layout: us
$ ./locale-test-24 
Default locale: en_US

So with GraalVM for JDK 24, native images behave more like java would.

Copy link
Contributor Author

@zakkak zakkak Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, which means that defaultLocale currently has no effect at the native-image run-time locale starting with GraalVM for JDK 24 (other than including the locale in the image). I am starting to believe that the best thing to do is to print a warning saying that defaultLocale is ignored (when using GraalVM for JDK 24) and deprecate it once GraalVM for JDK 25 is out.

I think adding the default locale to the list of included locales is still a good thing to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsmet @Karm WDYT about:

I am starting to believe that the best thing to do is to print a warning saying that defaultLocale is ignored (when using GraalVM for JDK 24) and deprecate it once GraalVM for JDK 25 is out.

Copy link
Contributor Author

@zakkak zakkak Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radcortez I made defaultLocale an Optional and thus removed the defaultValue from its annotation (in another commit hash), but that resulted in the following exception:

Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Set.contains(Object)" because "this.val$localesBuildTimeConfig.locales" is null
	at io.quarkus.hibernate.validator.runtime.HibernateValidatorRecorder$2.created(HibernateValidatorRecorder.java:87)
	at io.quarkus.arc.runtime.ArcRecorder.initBeanContainer(ArcRecorder.java:80)
	at io.quarkus.deployment.steps.ArcProcessor$notifyBeanContainerListeners1304312071.deploy_0(Unknown Source)
	at io.quarkus.deployment.steps.ArcProcessor$notifyBeanContainerListeners1304312071.deploy(Unknown Source)
	... 42 more

See https://github.com/zakkak/quarkus/actions/runs/11203768674/job/31141630432#step:16:636

Note that the field it's complaining about is the locales one (which I didn't change and I kept its defaultValue) and not the defaultLocale.

Is that expected behavior? Am I missing some configuration?

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotted a typo in the config doc, other than that it looks good, thanks!

This comment has been minimized.

Copy link
Member

@Karm Karm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx.

I'd add a test for 24.2 to see what happened with the "old" prop.
Other than that the only concern is Hibernate Validator and if it can handle that.

@@ -3,3 +3,4 @@ quarkus.locales=de,fr-FR,ja,uk-UA
# used in your application properties. This test uses it only to verify compatibility.
quarkus.native.user-language=cs
quarkus.default-locale=en-US
quarkus.test.arg-line=-Duser.language=de
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zakkak Does it mean the user language cs is ignored and should not be available in this case? Could you call https://github.com/quarkusio/quarkus/blob/main/integration-tests/locales/app/src/main/java/io/quarkus/locales/it/LocalesResource.java#L27 in > 24.2 test too then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, it'll be available since cs is being added as an additional locale. The difference to Mandrel for JDK 23 is that you can no longer fix the default locale at build time. If you want a fixed locale the image needs -Duser.language=cs passed at runtime to fix it to cs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, the cs locale will be available but not the default at runtime and passing -Duser.language= we can set any of the available locales as the default.

@zakkak
Copy link
Contributor Author

zakkak commented Sep 24, 2024

I'd add a test for 24.2 to see what happened with the "old" prop.

Can you elaborate on that? What is the "old" prop? I added (but didn't push yet) a new test to test the default locale when not using quarkus.test.arg-line, is that what you mean?

@jerboaa
Copy link
Contributor

jerboaa commented Sep 24, 2024

I added (but didn't push yet) a new test to test the default locale when not using quarkus.test.arg-line, is that what you mean?

Sounds flaky, as it would depend on the system locale at runtime.

@zakkak
Copy link
Contributor Author

zakkak commented Sep 25, 2024

Sounds flaky, as it would depend on the system locale at runtime.

Yes, in the "new" approach were the locale is set at run-time instead of build-time we will probably need to set the locale at build time to something really exotic and just confirm that it's not used by default at run-time.

@jerboaa
Copy link
Contributor

jerboaa commented Sep 25, 2024

Sounds flaky, as it would depend on the system locale at runtime.

Yes, in the "new" approach were the locale is set at run-time instead of build-time we will probably need to set the locale at build time to something really exotic and just confirm that it's not used by default at run-time.

OK, fair enough.

@quarkus-bot quarkus-bot bot added the area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure label Sep 25, 2024

This comment has been minimized.

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Minor nits. Feel free to take the suggestions or leave it as is. Up to you.

@zakkak
Copy link
Contributor Author

zakkak commented Sep 25, 2024

LGTM. Minor nits. Feel free to take the suggestions or leave it as is. Up to you.

Thanks for the review @jerboaa!

I (unsuccessfully) tried sticking to the existing naming convention. I will rename them if more changes are requested.

@geoand
Copy link
Contributor

geoand commented Sep 30, 2024

Where are we with this?

At the very least, it needs a rebase on main to fix the conflicts

*/
@ConfigItem(defaultValue = DEFAULT_LANGUAGE + "-" + DEFAULT_COUNTRY, defaultValueDocumentation = "Build system locale")
public Locale defaultLocale;
public Optional<Locale> defaultLocale;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You make it optional but you still have a defaultValue set so I fail to see when it's going to be empty?

You're mentioning an Hibernate Validator issue but it looks like you fixed it? Maybe you forgot to drop it afterwards?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with 0ea1c6b PTAL (I will squash once you are OK with the changes and CI passes)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, you can remove the sentence starting with Defaults to... in the main javadoc as the defaultValueDocumentation will be printed in the doc.

Anyway, looks good to me. I let you squash things as you see fit and then we can merge!

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand all the changes you made thus why I asked questions.

This comment has been minimized.

This comment has been minimized.

*/
@ConfigItem(defaultValue = DEFAULT_LANGUAGE + "-" + DEFAULT_COUNTRY, defaultValueDocumentation = "Build system locale")
public Locale defaultLocale;
public Optional<Locale> defaultLocale;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, you can remove the sentence starting with Defaults to... in the main javadoc as the defaultValueDocumentation will be printed in the doc.

Anyway, looks good to me. I let you squash things as you see fit and then we can merge!

@Karm
Copy link
Member

Karm commented Oct 22, 2024

@zakkak In the light of #43997, could you make sure those tests actually all run with the native executable in CI, please?

@zakkak
Copy link
Contributor Author

zakkak commented Oct 22, 2024

@zakkak In the light of #43997, could you make sure those tests actually all run with the native executable in CI, please?

Yes, you can see them running here https://github.com/quarkusio/quarkus/actions/runs/11401583858/job/31725538105?pr=43448#step:16:2568

Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

As discussed in
quarkusio#43533 (reply in thread)
this patch updates the locales support so that:

- if neither `quarkus.locales` nor `quarkus.default-locale` is set, the
Quarkus applications should default to English (`en_US`), instead of the
build systems locale (which is the current behavior), at run-time.

- if `quarkus.default-locale` is set but `quarkus.locales` is not set,
then we should only include the locale `quarkus.default-locale` is set
to. This is the current behavior with GraalVM for JDK 21.

- if both `quarkus.default-locale` and `quarkus.locales` are set, then
we should include only the locales from `quarkus.locales` and the one
from `quarkus.default-locale` (this is the current behavior).

- if `quarkus.locales` is set but `quarkus.default-locale` is not set,
then we should include only the locales from `quarkus.locales` and
default to English, instead of the build systems locale (which is the
current behavior), at run-time (similarly to point 1).

- if `quarkus.default-locale` (which is build time fixed) is set, it is used to set the default `user.language` and `user.country` values at run-time, while users may still override them.

For points 2 and 3 starting with graalVM for JDK 24 we also include
`en_US` which shouldn't be a big issue as mentioned in
quarkusio#43533 (reply in thread),

CAUTION: Point 1 changes the current behavior, meaning we need to
clearly document and communicate it.

This patch also updates the Locales integration tests accordingly.

See oracle/graal#9694
@zakkak
Copy link
Contributor Author

zakkak commented Oct 22, 2024

Squashed and rebased.

@zakkak zakkak added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Oct 22, 2024
Copy link

quarkus-bot bot commented Oct 22, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 7f39ccc.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
✔️ JVM Tests - JDK 17 Logs Raw logs 🔍
JVM Tests - JDK 21 Build Failures Logs Raw logs 🔍

Full information is available in the Build summary check run.
You can consult the Develocity build scans.

Failures

⚙️ JVM Tests - JDK 21 #

- Failing: integration-tests/mongodb-devservices 

📦 integration-tests/mongodb-devservices

io.quarkus.it.mongodb.BookResourceTest. - History - More details - Source on GitHub

java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.app.RunningQuarkusApplication.getClassLoader()" because "io.quarkus.test.junit.QuarkusTestExtension.runningQuarkusApplication" is null
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:909)
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:901)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptAfterAllMethod(QuarkusTestExtension.java:895)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	Suppressed: org.opentest4j.TestAbortedException: Boot failed

io.quarkus.it.mongodb.BookResourceWithParameterInjectionTest. - History - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.mongodb.deployment.DevServicesMongoProcessor#startMongo threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/mongo:7.0, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@b3fad34)
	at io.quarkus.mongodb.deployment.DevServicesMongoProcessor.startMongo(DevServicesMongoProcessor.java:122)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)

io.quarkus.it.mongodb.OtherProfileBookResourceTest.testBlockingClient - History - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.mongodb.deployment.DevServicesMongoProcessor#startMongo threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=docker.io/mongo:7.0, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@38cc61e6)
	at io.quarkus.mongodb.deployment.DevServicesMongoProcessor.startMongo(DevServicesMongoProcessor.java:122)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)

Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/smallrye-reactive-messaging/deployment

io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector - History

  • Expecting actual: ["-6","-8","-9","-10","-11","-12","-13","-14"] to start with: ["-6", "-7", "-8", "-9"] - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual:
  ["-6","-8","-9","-10","-11","-12","-13","-14"]
to start with:
  ["-6", "-7", "-8", "-9"]

	at io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector(ConnectorChangeTest.java:41)

⚙️ JVM Tests - JDK 21

📦 extensions/infinispan-cache/deployment

io.quarkus.cache.infinispan.InfinispanCacheTest.testGetAsyncWithParallelCalls - History

  • expected: "thread1" but was: "thread2" - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: 

expected: "thread1"
 but was: "thread2"
	at io.quarkus.cache.infinispan.InfinispanCacheTest.testGetAsyncWithParallelCalls(InfinispanCacheTest.java:283)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:513)
	at io.quarkus.test.QuarkusUnitTest.interceptTestMethod(QuarkusUnitTest.java:427)

📦 integration-tests/mongodb-panache

io.quarkus.it.mongodb.panache.ReflectionFreeSerializationTest.testReactiveBookEntity - History

  • com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input at [Source: REDACTED (\StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]-java.lang.RuntimeException`
java.lang.RuntimeException: 
com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
	at io.restassured.internal.path.json.mapping.JsonPathJackson2ObjectDeserializer.deserialize(JsonPathJackson2ObjectDeserializer.java:30)
	at io.restassured.path.json.mapping.JsonPathObjectDeserializer$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.Jackson2Mapper.deserialize(Jackson2Mapper.groovy:58)
	at io.restassured.mapper.ObjectMapper$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.ObjectMapping.parseWithJackson2(ObjectMapping.groovy:254)

⚙️ Maven Tests - JDK 17 Windows

📦 integration-tests/maven

io.quarkus.maven.it.TestMojoIT.testThatTheTestsAreReRunMultiModule - History

  • Condition with Lambda expression in io.quarkus.maven.it.continuoustesting.TestModeContinuousTestingMavenTestUtils was not fulfilled within 3 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.maven.it.continuoustesting.TestModeContinuousTestingMavenTestUtils was not fulfilled within 3 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
	at io.quarkus.maven.it.continuoustesting.TestModeContinuousTestingMavenTestUtils.waitForNextCompletion(TestModeContinuousTestingMavenTestUtils.java:50)
	at io.quarkus.maven.it.LaunchMojoTestBase.testThatTheTestsAreReRunMultiModule(LaunchMojoTestBase.java:56)

io.quarkus.maven.it.TestMojoIT.testThatTheTestsAreReRunMultiModule - History

  • Condition with Lambda expression in io.quarkus.maven.it.continuoustesting.TestModeContinuousTestingMavenTestUtils was not fulfilled within 3 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.maven.it.continuoustesting.TestModeContinuousTestingMavenTestUtils was not fulfilled within 3 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
	at io.quarkus.maven.it.continuoustesting.TestModeContinuousTestingMavenTestUtils.waitForNextCompletion(TestModeContinuousTestingMavenTestUtils.java:50)
	at io.quarkus.maven.it.LaunchMojoTestBase.testThatTheTestsAreReRunMultiModule(LaunchMojoTestBase.java:56)

@gsmet
Copy link
Member

gsmet commented Oct 23, 2024

@karesti the InfinispanCacheTest has been failing a few times lately with this exact error, could you have a look?

@mariofusco I have also seen this ReflectionFreeSerializationTest failing a few times lately, always with this error.

@gsmet gsmet merged commit c814b75 into quarkusio:main Oct 23, 2024
52 of 53 checks passed
@quarkus-bot quarkus-bot bot added kind/bugfix and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Oct 23, 2024
@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Oct 23, 2024
@zakkak zakkak deleted the 2024-09-23-fix-43436 branch October 23, 2024 11:57
@zakkak
Copy link
Contributor Author

zakkak commented Oct 25, 2024

FTR the change has been documented in the migration guide for 3.17 here https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.17#locales

@karesti
Copy link
Member

karesti commented Oct 28, 2024

@gsmet created the issue #44127

gsmet added a commit to gsmet/quarkus that referenced this pull request Oct 29, 2024
This is to solve an issue that we can see from time to time in the CI:

java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.app.RunningQuarkusApplication.getClassLoader()" because "io.quarkus.test.junit.QuarkusTestExtension.runningQuarkusApplication" is null
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:909)
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:901)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptAfterAllMethod(QuarkusTestExtension.java:895)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	Suppressed: org.opentest4j.TestAbortedException: Boot failed

For instance here:
quarkusio#43448 (comment)
in the io.quarkus.it.mongodb.BookResourceTest failure.
gsmet added a commit to gsmet/quarkus that referenced this pull request Nov 5, 2024
This is to solve an issue that we can see from time to time in the CI:

java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.app.RunningQuarkusApplication.getClassLoader()" because "io.quarkus.test.junit.QuarkusTestExtension.runningQuarkusApplication" is null
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:909)
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:901)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptAfterAllMethod(QuarkusTestExtension.java:895)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	Suppressed: org.opentest4j.TestAbortedException: Boot failed

For instance here:
quarkusio#43448 (comment)
in the io.quarkus.it.mongodb.BookResourceTest failure.

(cherry picked from commit 96b0c2f)
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this pull request Nov 16, 2024
This is to solve an issue that we can see from time to time in the CI:

java.lang.NullPointerException: Cannot invoke "io.quarkus.bootstrap.app.RunningQuarkusApplication.getClassLoader()" because "io.quarkus.test.junit.QuarkusTestExtension.runningQuarkusApplication" is null
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:909)
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:901)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptAfterAllMethod(QuarkusTestExtension.java:895)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	Suppressed: org.opentest4j.TestAbortedException: Boot failed

For instance here:
quarkusio#43448 (comment)
in the io.quarkus.it.mongodb.BookResourceTest failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Locales Some integration test fails with GraalVM for JDK 24
7 participants