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

Mark duplicated context created by Vert.x as safe in non-blocking @ConsumeEvent #24246

Conversation

cescoffier
Copy link
Member

No description provided.

@cescoffier cescoffier requested a review from mkouba March 10, 2022 16:40
@cescoffier cescoffier added triage/backport? kind/bug Something isn't working labels Mar 10, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 10, 2022

Failing Jobs - Building 34514aa

Status Name Step Failures Logs Raw logs
Devtools Tests - JDK 11 Build Failures Logs Raw logs
Devtools Tests - JDK 17 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Devtools Tests - JDK 11 #

- Failing: integration-tests/devtools 

📦 integration-tests/devtools

io.quarkus.platform.catalog.RegistrySnapshotCatalogCompatibilityTest.testRegistrySnapshotPlatformCatalog line 30 - More details - Source on GitHub

java.lang.IllegalStateException: Failed to locate the dev tools config file (.quarkus/config.yaml)
	at io.quarkus.devtools.testing.registry.client.TestRegistryClient.<init>(TestRegistryClient.java:33)
	at io.quarkus.devtools.testing.registry.client.TestRegistryClientFactory.buildRegistryClient(TestRegistryClientFactory.java:32)

⚙️ Devtools Tests - JDK 17 #

- Failing: integration-tests/devtools 

📦 integration-tests/devtools

io.quarkus.platform.catalog.RegistrySnapshotCatalogCompatibilityTest.testRegistrySnapshotPlatformCatalog line 30 - More details - Source on GitHub

java.lang.IllegalStateException: Failed to locate the dev tools config file (.quarkus/config.yaml)
	at io.quarkus.devtools.testing.registry.client.TestRegistryClient.<init>(TestRegistryClient.java:33)
	at io.quarkus.devtools.testing.registry.client.TestRegistryClientFactory.buildRegistryClient(TestRegistryClientFactory.java:32)

@@ -147,12 +148,14 @@ public void testThatBlockingEventConsumersAreCalledOnDuplicatedContext() {
@ConsumeEvent(value = "context")
Uni<String> receive(String data) {
Assertions.assertTrue(Thread.currentThread().getName().contains("vert.x-eventloop"));
VertxContextSafetyToggle.validateContextIfExists("Not marked as safe", "Not marked as safe");
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, would it make sense to add a VertxContextSafetyToggle.validateContextIfExists() method which only accepts one string used for both the errorMessageOnVeto and errorMessageOnDoubt? It would save some typing ;-)

Copy link
Member Author

Choose a reason for hiding this comment

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

Here it's just for a test.
When you want to really check, ou need two different messages.

Copy link
Contributor

Choose a reason for hiding this comment

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

Here it's just for a test.

Yep, I know... but it would help with tests at least ;-)

Copy link
Contributor

@mkouba mkouba 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.

@cescoffier cescoffier merged commit 3097830 into quarkusio:main Mar 11, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Mar 11, 2022
@cescoffier cescoffier deleted the mark-context-safe-in-non-blocking-consume-event branch March 11, 2022 13:32
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.5.Final Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertx kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants