Closed hantsy closed 3 years ago
Can you share a complete reproducer? I just tried and I could not reproduce.
The instructions for running the Postgres DB are missing
Thanks.
This is not a bug, the issue in the test setup method:
vertx.deployVerticle(new MainVerticle())
.subscribe(
data -> {
log.info("deployed: {}", data);
// The following line creates a handler that is never used
testContext.succeeding(id -> testContext.completeNow());
},
error -> log.error("error: {}", error)
);
Change it to:
vertx.deployVerticle(new MainVerticle())
.subscribe(
data -> {
log.info("deployed: {}", data);
testContext.completeNow();
},
error -> {
log.error("error: {}", error);
// Without this line the test will timeout in case of failure to deploy the verticle
testContext.failNow(Error);
}
);
I tried to use the Rxjava 3 vertx in Junit to deploy a Verticle, but it does not work as expected.
There is a timeout exception when running the testing codes.
Alternatively, I have to use the approach in the RxJava3Test.java to overcome this temporarily.