File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
vertx-pg-client/src/test/java/io/vertx/pgclient Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public void start() {
6868 public void testCloseAutomatically (TestContext ctx ) {
6969 int maxSize = 8 ;
7070 int instances = maxSize * 4 ;
71- Async latch = ctx .async (instances );
71+ Async latch = ctx .async (1 + instances );
7272 AtomicReference <String > deployment = new AtomicReference <>();
7373 Async async = ctx .async ();
7474 vertx .deployVerticle (() -> new AbstractVerticle () {
@@ -80,7 +80,10 @@ public void start() {
8080 .query ("SELECT 1" )
8181 .execute (ctx .asyncAssertSuccess (res -> latch .countDown ()));
8282 }
83- }, new DeploymentOptions ().setInstances (instances ), ctx .asyncAssertSuccess (deployment ::set ));
83+ }, new DeploymentOptions ().setInstances (instances ), ctx .asyncAssertSuccess (id -> {
84+ deployment .set (id );
85+ latch .countDown ();
86+ }));
8487 latch .awaitSuccess (20_000 );
8588 vertx .undeploy (deployment .get ())
8689 .compose (v -> PgConnection .connect (vertx , options ))
You can’t perform that action at this time.
0 commit comments