File tree Expand file tree Collapse file tree
vertx-mysql-client/src/test/java/io/vertx/tests/mysqlclient/tck
main/java/io/vertx/sqlclient/impl
test/java/io/vertx/tests/sqlclient/tck Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ public void testQueryCloseCursor(TestContext ctx) {
4545 super .testQueryCloseCursor (ctx );
4646 }
4747
48+ @ Test
49+ @ Ignore ("Fetch command not supported by ProxySQL" )
50+ @ Override
51+ public void testQueryCloseCursorTwice (TestContext ctx ) {
52+ super .testQueryCloseCursorTwice (ctx );
53+ }
54+
4855 @ Test
4956 @ Ignore ("Fetch command not supported by ProxySQL" )
5057 @ Override
Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ private synchronized void close(Promise<Void> promise) {
9898 result = null ;
9999 ps .closeCursor (id , promise );
100100 }
101+ } else {
102+ promise .complete ();
101103 }
102104 }
103105}
Original file line number Diff line number Diff line change 1111package io .vertx .tests .sqlclient .tck ;
1212
1313import io .vertx .core .AsyncResult ;
14+ import io .vertx .core .Future ;
1415import io .vertx .core .Handler ;
1516import io .vertx .core .Vertx ;
1617import io .vertx .ext .unit .Async ;
@@ -305,6 +306,19 @@ public void testQueryCloseCursor(TestContext ctx) {
305306 });
306307 }
307308
309+ @ Test
310+ public void testQueryCloseCursorTwice (TestContext ctx ) {
311+ Async async = ctx .async ();
312+ testCursor (ctx , conn -> {
313+ conn
314+ .prepare ("SELECT * FROM immutable" )
315+ .onComplete (ctx .asyncAssertSuccess (ps -> {
316+ Cursor cursor = ps .cursor (Tuple .tuple ());
317+ Future .all (cursor .close (), cursor .close ()).onComplete (ctx .asyncAssertSuccess (v -> async .complete ()));
318+ }));
319+ });
320+ }
321+
308322 @ Test
309323 public void testQueryStreamCloseCursor (TestContext ctx ) {
310324 Async async = ctx .async ();
You can’t perform that action at this time.
0 commit comments