Closed muthenberg closed 4 years ago
deployVerticle
is an asynchronous operation, so System.out.println("End prepare");
is likely to be run before deployVerticle
has completed. Same with System.out.println("End test");
.
The JUnit5 lifecycle is respected, the extension is waiting for completion of the asynchronous tasks. It's just that your test and before/after methods will exit before these asynchronous tasks have completed.
Version
Versions 3.8.5 and 3.9.0
Context
I have an application that needs to nest all REST-API calls in an authentication REST-API call. So all the tests have a WebClient, which does an authentication call and inside the succeeding handler of that authentication call does another call to the actual API endpoint using the acquired authentication token. However the test case finishes before the WebClient has finished and calls the @AfterEach method shutting down my environment.
Do you have a reproducer?
I cloned your vertx-gradle-starter project and modified the test case as a reproducer here: https://github.com/muthenberg/vertx-gradle-starter/tree/reproducer
Steps to reproduce