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

Use latest SmallRye Context Propagation #41064

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<smallrye-graphql.version>2.8.4</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.3.0</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.5.2</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.0</smallrye-context-propagation.version>
<smallrye-context-propagation.version>2.1.2</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>3.0.1</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>3.12.0</smallrye-mutiny-vertx-binding.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ public void testFailure() throws InterruptedException {
verifyFailure("foo-completion-stage", "java.lang.NullPointerException: Something is null", false);
verifyFailure("foo-completion-stage-failure", "boom", true);
verifyFailure("foo-uni", "java.lang.NullPointerException: Something is null", false);
verifyFailure("foo-uni-failure", "boom", true);
verifyFailure("foo-uni-failure", "java.io.IOException: boom", true);

verifyFailure("foo-blocking", "java.lang.IllegalStateException: Red is dead", false);
verifyFailure("foo-message-blocking", "java.lang.NullPointerException", false);
verifyFailure("foo-completion-stage-blocking", "java.lang.NullPointerException: Something is null", false);
verifyFailure("foo-completion-stage-failure-blocking", "boom", true);
verifyFailure("foo-uni-blocking", "java.lang.NullPointerException: Something is null", false);
verifyFailure("foo-uni-failure-blocking", "boom", true);
verifyFailure("foo-uni-failure-blocking", "java.io.IOException: boom", true);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.quarkus.context.test.mutiny;

import java.net.MalformedURLException;
import java.time.Duration;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -461,4 +462,21 @@ public Flow.Publisher<String> transactionPropagationWithMulti2() {
Assertions.assertEquals(2, Person.deleteAll());
return ret;
}

@GET
@Path("/bug40852")
public String bug40852() {
var futureW = Uni
.createFrom()
.item("item")
.onItem()
.delayIt()
.by(Duration.ofMillis(100))
.subscribeAsCompletionStage();

futureW.whenComplete((result, error) -> {
Assertions.assertEquals(true, futureW.isDone());
}).join();
return "OK";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ public void testTransactionContextPropagationMulti() {
.statusCode(Response.Status.OK.getStatusCode()));
}

@Test
public void testContextPropagationBug40852() {
RestAssured.when().get("/mutiny-context/bug40852").then()
.statusCode(Response.Status.OK.getStatusCode());
}

private void awaitState(ThrowingRunnable task) {
Awaitility.await().atMost(5, TimeUnit.SECONDS)
.pollInterval(100, TimeUnit.MILLISECONDS)
Expand Down
Loading