Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ public void testQueryCloseCursor(TestContext ctx) {
super.testQueryCloseCursor(ctx);
}

@Test
@Ignore("Fetch command not supported by ProxySQL")
@Override
public void testQueryCloseCursorTwice(TestContext ctx) {
super.testQueryCloseCursorTwice(ctx);
}

@Test
@Ignore("Fetch command not supported by ProxySQL")
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ private synchronized void close(Promise<Void> promise) {
result = null;
ps.closeCursor(id, promise);
}
} else {
promise.complete();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package io.vertx.tests.sqlclient.tck;

import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.ext.unit.Async;
Expand Down Expand Up @@ -305,6 +306,19 @@ public void testQueryCloseCursor(TestContext ctx) {
});
}

@Test
public void testQueryCloseCursorTwice(TestContext ctx) {
Async async = ctx.async();
testCursor(ctx, conn -> {
conn
.prepare("SELECT * FROM immutable")
.onComplete(ctx.asyncAssertSuccess(ps -> {
Cursor cursor = ps.cursor(Tuple.tuple());
Future.all(cursor.close(), cursor.close()).onComplete(ctx.asyncAssertSuccess(v -> async.complete()));
}));
});
}

@Test
public void testQueryStreamCloseCursor(TestContext ctx) {
Async async = ctx.async();
Expand Down