Skip to content

Commit

Permalink
Fix expected type of pg_terminate_backend result in testNoConnectionL…
Browse files Browse the repository at this point in the history
…eaks
  • Loading branch information
kdubb committed Mar 31, 2023
1 parent ddec7ad commit 51e6760
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ public void testPoolConnectTimeout(TestContext ctx) {
public void testNoConnectionLeaks(TestContext ctx) {
Async killConnections = ctx.async();
PgConnection.connect(vertx, options).onComplete(ctx.asyncAssertSuccess(conn -> {
Collector<Row, ?, List<Integer>> collector = mapping(row -> row.getInteger(0), toList());
Collector<Row, ?, List<Boolean>> collector = mapping(row -> row.getBoolean(0), toList());
String sql = "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = $1";
PreparedQuery<SqlResult<List<Integer>>> preparedQuery = conn.preparedQuery(sql).collecting(collector);
PreparedQuery<SqlResult<List<Boolean>>> preparedQuery = conn.preparedQuery(sql).collecting(collector);
Tuple params = Tuple.of(options.getDatabase());
preparedQuery.execute(params).compose(cf -> conn.close()).onComplete(ctx.asyncAssertSuccess(v -> killConnections.complete()));
}));
Expand Down

0 comments on commit 51e6760

Please sign in to comment.