Skip to content

Commit

Permalink
Fix TracingTest failures (#88)
Browse files Browse the repository at this point in the history
This follows-up on sticky context removal in Vert.x core.

Signed-off-by: Thomas Segismont <[email protected]>
  • Loading branch information
tsegismont authored Jan 9, 2025
1 parent ff5c5d0 commit 7c241ad
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/test/java/io/vertx/cassandra/tests/TracingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
}));
}));
}));

});
}
}

0 comments on commit 7c241ad

Please sign in to comment.