From 7c241ad4c6d352647d5feb3543e804a39f0acacb Mon Sep 17 00:00:00 2001 From: Thomas Segismont Date: Thu, 9 Jan 2025 17:42:15 +0100 Subject: [PATCH] Fix TracingTest failures (#88) This follows-up on sticky context removal in Vert.x core. Signed-off-by: Thomas Segismont --- .../io/vertx/cassandra/tests/TracingTest.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/test/java/io/vertx/cassandra/tests/TracingTest.java b/src/test/java/io/vertx/cassandra/tests/TracingTest.java index d963284..0438d5b 100644 --- a/src/test/java/io/vertx/cassandra/tests/TracingTest.java +++ b/src/test/java/io/vertx/cassandra/tests/TracingTest.java @@ -91,9 +91,11 @@ public void receiveResponse(Context context, Object response, Object payload, Th } }; - client.executeWithFullFetch(cql).onComplete(ctx.asyncAssertSuccess(rows -> { - async.countDown(); - })); + expectedContext.runOnContext(v -> { + client.executeWithFullFetch(cql).onComplete(ctx.asyncAssertSuccess(rows -> { + async.countDown(); + })); + }); } @Test @@ -126,7 +128,9 @@ public void receiveResponse(Context context, Object response, Object payload, Th } }; - client.executeWithFullFetch(cql).onComplete(ctx.asyncAssertFailure(t -> async.countDown())); + expectedContext.runOnContext(v -> { + client.executeWithFullFetch(cql).onComplete(ctx.asyncAssertFailure(t -> async.countDown())); + }); } @Test @@ -161,11 +165,12 @@ public void receiveResponse(Context context, Object response, Object payload, Th } }; - client.prepare(cql).onComplete(ctx.asyncAssertSuccess(ps -> { - client.execute(ps.bind("B")).onComplete(ctx.asyncAssertSuccess(rs -> { - async.countDown(); + expectedContext.runOnContext(v -> { + client.prepare(cql).onComplete(ctx.asyncAssertSuccess(ps -> { + client.execute(ps.bind("B")).onComplete(ctx.asyncAssertSuccess(rs -> { + async.countDown(); + })); })); - })); - + }); } }