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

Add support for java.util.Map to ConfigInstantiator #23652

Merged
merged 1 commit into from
Feb 19, 2022
Merged

Add support for java.util.Map to ConfigInstantiator #23652

merged 1 commit into from
Feb 19, 2022

Conversation

famod
Copy link
Member

@famod famod commented Feb 13, 2022

The main motivation is to pick up log category level config when running a simple unit test (see also latest enhancements to BasicLoggingEnabler: #23628).

This is in draft mode for now because the following test fails with twice the number of handlers than expected:
https://github.com/quarkusio/quarkus/blob/main/core/test-extension/deployment/src/test/java/io/quarkus/logging/CategoryConfiguredHandlerTest.java#L41-L42

For that I added a quickfix which surely isn't going to be merged like this. I'll add a comment so we can discuss this specifically.

@quarkus-bot quarkus-bot bot added area/config area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Feb 13, 2022
@@ -209,6 +209,7 @@ LoggingSetupBuildItem setupLoggingRuntimeInit(LoggingSetupRecorder recorder, Log
possibleSupplier, launchModeBuildItem.getLaunchMode());
LogConfig logConfig = new LogConfig();
ConfigInstantiator.handleObject(logConfig);
logConfig.categories.clear(); // FIXME: workaround for duplicate handlers in CategoryConfiguredHandlerTest:42
Copy link
Member Author

@famod famod Feb 13, 2022

Choose a reason for hiding this comment

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

@stuartwdouglas @geoand this where I need some help:
The call on the previous line will now also provide category config (as expected). This makes the test fail because it only expects one ConsoleHandler and one FileHandler, not two of each.

I must say I'm very confused why LogConfig is recreated here (it's already fully available to this method via log, e.g. it's passed to recorder.initializeLogging() on line 206).
I also fail to understand how LoggingSetupRecorder.initializeBuildTimeLogging() (called further down) was ever able to handle category config:

for (Map.Entry<String, CategoryConfig> entry : categories.entrySet()) {

I mean, before my change Maps weren't even evaluated/populated...?

I'm less than sure what's the right approach here. Is the test to be adjusted? But aren't duplicated handlers a problem indeed?

Copy link
Member

Choose a reason for hiding this comment

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

I think you need to add a clearHandlers() call to io.quarkus.bootstrap.logging.QuarkusDelayedHandler#buildTimeComplete.

Copy link
Member

Choose a reason for hiding this comment

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

The reason why LogConfig is created here is because it is runtime config, and this is a build time method. It's kinda hacky, but we basically just use whatever the current config would be to initialize build time logging (just so we don't have to duplicate all logging config into a new build time config).

Copy link
Contributor

Choose a reason for hiding this comment

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

To be honest, I can't say I know the reason either

Copy link
Member Author

Choose a reason for hiding this comment

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

@stuartwdouglas can you shed some light on this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you need to add a clearHandlers() call to io.quarkus.bootstrap.logging.QuarkusDelayedHandler#buildTimeComplete.

Makes sense and it does work! Thanks!

The reason why LogConfig is created here is because it is runtime config, and this is a build time method. It's kinda hacky, but we basically just use whatever the current config would be to initialize build time logging (just so we don't have to duplicate all logging config into a new build time config).

Ok, so LogConfig log passed to this method is not to be confused with LogConfig logConfig?

return map;
}
var processedSegments = new HashSet<String>();
// infer the map keys from existing property names
Copy link
Member Author

@famod famod Feb 13, 2022

Choose a reason for hiding this comment

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

So I'm extracting the segments/map keys from all present property names.

At this point I have no idea whether or not this covers env var flavors (e.g. QUARKUS_FOO).

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

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

Oops, looks like I left my comments on pending.

@@ -209,6 +209,7 @@ LoggingSetupBuildItem setupLoggingRuntimeInit(LoggingSetupRecorder recorder, Log
possibleSupplier, launchModeBuildItem.getLaunchMode());
LogConfig logConfig = new LogConfig();
ConfigInstantiator.handleObject(logConfig);
logConfig.categories.clear(); // FIXME: workaround for duplicate handlers in CategoryConfiguredHandlerTest:42
Copy link
Member

Choose a reason for hiding this comment

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

I think you need to add a clearHandlers() call to io.quarkus.bootstrap.logging.QuarkusDelayedHandler#buildTimeComplete.

@@ -209,6 +209,7 @@ LoggingSetupBuildItem setupLoggingRuntimeInit(LoggingSetupRecorder recorder, Log
possibleSupplier, launchModeBuildItem.getLaunchMode());
LogConfig logConfig = new LogConfig();
ConfigInstantiator.handleObject(logConfig);
logConfig.categories.clear(); // FIXME: workaround for duplicate handlers in CategoryConfiguredHandlerTest:42
Copy link
Member

Choose a reason for hiding this comment

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

The reason why LogConfig is created here is because it is runtime config, and this is a build time method. It's kinda hacky, but we basically just use whatever the current config would be to initialize build time logging (just so we don't have to duplicate all logging config into a new build time config).

@famod famod marked this pull request as ready for review February 14, 2022 23:30
@famod famod requested a review from stuartwdouglas February 14, 2022 23:30
@famod
Copy link
Member Author

famod commented Feb 14, 2022

I'm adding the backport label because I kind of "advertised" to users that logging in Unit tests now works in 2.7 and it's unexpected that it won't pick up category config (before this PR).

@quarkusio quarkusio deleted a comment from quarkus-bot bot Feb 14, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 15, 2022

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 5781722

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs
Maven Tests - JDK 11 Build Failures Logs Raw logs
Maven Tests - JDK 11 Windows Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/kotlin integration-tests/picocli-native integration-tests/scala 

📦 integration-tests/kotlin

io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange line 25 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange(KotlinRemoteDevModeIT.java:25)

📦 integration-tests/picocli-native

io.quarkus.it.picocli.PicocliTest.testIncludeLogCommand(QuarkusMainLauncher) line 51 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

📦 integration-tests/scala

io.quarkus.scala.maven.it.ScalaRemoteDevModeIT.testThatTheApplicationIsReloadedOnScalaChange line 25 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.scala.maven.it.ScalaRemoteDevModeIT.testThatTheApplicationIsReloadedOnScalaChange(ScalaRemoteDevModeIT.java:25)

⚙️ JVM Tests - JDK 11 Windows #

- Failing: integration-tests/kotlin integration-tests/picocli-native integration-tests/scala 

📦 integration-tests/kotlin

io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange line 25 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange(KotlinRemoteDevModeIT.java:25)

📦 integration-tests/picocli-native

io.quarkus.it.picocli.PicocliTest.testIncludeLogCommand(QuarkusMainLauncher) line 51 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

📦 integration-tests/scala

io.quarkus.scala.maven.it.ScalaRemoteDevModeIT.testThatTheApplicationIsReloadedOnScalaChange line 25 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.scala.maven.it.ScalaRemoteDevModeIT.testThatTheApplicationIsReloadedOnScalaChange(ScalaRemoteDevModeIT.java:25)

⚙️ JVM Tests - JDK 17 #

- Failing: integration-tests/kotlin integration-tests/picocli-native integration-tests/scala 

📦 integration-tests/kotlin

io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange line 25 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.kotlin.maven.it.KotlinRemoteDevModeIT.testThatTheApplicationIsReloadedOnKotlinChange(KotlinRemoteDevModeIT.java:25)

📦 integration-tests/picocli-native

io.quarkus.it.picocli.PicocliTest.testIncludeLogCommand(QuarkusMainLauncher) line 51 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

📦 integration-tests/scala

io.quarkus.scala.maven.it.ScalaRemoteDevModeIT.testThatTheApplicationIsReloadedOnScalaChange line 25 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.scala.maven.it.ScalaRemoteDevModeIT.testThatTheApplicationIsReloadedOnScalaChange(ScalaRemoteDevModeIT.java:25)

⚙️ Maven Tests - JDK 11 #

- Failing: integration-tests/maven 

📦 integration-tests/maven

io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue line 164 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue(RemoteDevMojoIT.java:164)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource line 66 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource(RemoteDevMojoIT.java:66)

io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered line 201 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered(RemoteDevMojoIT.java:201)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange line 98 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange(RemoteDevMojoIT.java:98)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange line 34 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange(RemoteDevMojoIT.java:34)

io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue line 164 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue(RemoteDevMojoIT.java:164)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource line 66 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource(RemoteDevMojoIT.java:66)

io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered line 201 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered(RemoteDevMojoIT.java:201)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange line 98 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange(RemoteDevMojoIT.java:98)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange line 34 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange(RemoteDevMojoIT.java:34)

⚙️ Maven Tests - JDK 11 Windows #

- Failing: integration-tests/maven 

📦 integration-tests/maven

io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue line 164 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue(RemoteDevMojoIT.java:164)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource line 66 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource(RemoteDevMojoIT.java:66)

io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered line 201 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered(RemoteDevMojoIT.java:201)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange line 98 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange(RemoteDevMojoIT.java:98)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange line 34 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange(RemoteDevMojoIT.java:34)

io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue line 164 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatApplicationRecoversCompilationIssue(RemoteDevMojoIT.java:164)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource line 66 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnNewResource(RemoteDevMojoIT.java:66)

io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered line 201 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatNewBeanAreDiscovered(RemoteDevMojoIT.java:201)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange line 98 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnConfigChange(RemoteDevMojoIT.java:98)

io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange line 34 - More details - Source on GitHub

java.lang.RuntimeException: org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase was not fulfilled within 1 minutes.
	at io.quarkus.maven.it.RunAndCheckWithAgentMojoTestBase.runAndCheck(RunAndCheckWithAgentMojoTestBase.java:83)
	at io.quarkus.maven.it.RemoteDevMojoIT.testThatTheApplicationIsReloadedOnJavaChange(RemoteDevMojoIT.java:34)

@famod
Copy link
Member Author

famod commented Feb 15, 2022

I need to have a closer look at those test failures. I guess that clearHandlers() call has broken something for them.

@@ -207,6 +207,7 @@ public void addLoggingCloseTask(Runnable runnable) {

public synchronized void buildTimeComplete() {
buildTimeLoggingActivated = false;
runCloseTasks();
Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out that calling clearHandlers() breaks a couple of tests that try to capture log output (see #23652 (comment)).
Just running the close tasks instead is the "middle ground" that seems to work for all tests. Let's see what CI has to say...

@famod famod merged commit 9f5c1c1 into quarkusio:main Feb 19, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Feb 19, 2022
@famod famod deleted the ConfigInstantiator-maps branch February 19, 2022 09:28
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.2.Final Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants