@@ -338,7 +338,7 @@ public void testPipeliningDistribution(TestContext ctx) {
338
338
public void testPoolIdleTimeout (TestContext ctx ) {
339
339
ProxyServer proxy = ProxyServer .create (vertx , options .getPort (), options .getHost ());
340
340
AtomicReference <ProxyServer .Connection > proxyConn = new AtomicReference <>();
341
- int pooleCleanerPeriod = 100 ;
341
+ int poolCleanerPeriod = 100 ;
342
342
int idleTimeout = 3000 ;
343
343
Async latch = ctx .async ();
344
344
proxy .proxyHandler (conn -> {
@@ -347,8 +347,8 @@ public void testPoolIdleTimeout(TestContext ctx) {
347
347
conn .clientCloseHandler (v -> {
348
348
long lifetime = System .currentTimeMillis () - now ;
349
349
int delta = 500 ;
350
- int lowerBound = idleTimeout - pooleCleanerPeriod - delta ;
351
- int upperBound = idleTimeout + pooleCleanerPeriod + delta ;
350
+ int lowerBound = idleTimeout - poolCleanerPeriod - delta ;
351
+ int upperBound = idleTimeout + poolCleanerPeriod + delta ;
352
352
ctx .assertTrue (lifetime >= lowerBound , "Was expecting connection to be closed in more than " + lowerBound + ": " + lifetime );
353
353
ctx .assertTrue (lifetime <= upperBound , "Was expecting connection to be closed in less than " + upperBound + ": " + lifetime );
354
354
latch .complete ();
@@ -362,7 +362,7 @@ public void testPoolIdleTimeout(TestContext ctx) {
362
362
listenLatch .awaitSuccess (20_000 );
363
363
364
364
poolOptions
365
- .setPoolCleanerPeriod (pooleCleanerPeriod )
365
+ .setPoolCleanerPeriod (poolCleanerPeriod )
366
366
.setMaxLifetime (0 )
367
367
.setIdleTimeout (idleTimeout )
368
368
.setIdleTimeoutUnit (TimeUnit .MILLISECONDS );
@@ -381,7 +381,7 @@ public void testPoolIdleTimeout(TestContext ctx) {
381
381
public void testPoolMaxLifetime (TestContext ctx ) {
382
382
ProxyServer proxy = ProxyServer .create (vertx , options .getPort (), options .getHost ());
383
383
AtomicReference <ProxyServer .Connection > proxyConn = new AtomicReference <>();
384
- int pooleCleanerPeriod = 100 ;
384
+ int poolCleanerPeriod = 100 ;
385
385
int maxLifetime = 3000 ;
386
386
Async latch = ctx .async ();
387
387
proxy .proxyHandler (conn -> {
@@ -390,8 +390,8 @@ public void testPoolMaxLifetime(TestContext ctx) {
390
390
conn .clientCloseHandler (v -> {
391
391
long lifetime = System .currentTimeMillis () - now ;
392
392
int delta = 500 ;
393
- int lowerBound = maxLifetime - pooleCleanerPeriod - delta ;
394
- int upperBound = maxLifetime + pooleCleanerPeriod + delta ;
393
+ int lowerBound = maxLifetime - poolCleanerPeriod - delta ;
394
+ int upperBound = maxLifetime + poolCleanerPeriod + delta ;
395
395
ctx .assertTrue (lifetime >= lowerBound , "Was expecting connection to be closed in more than " + lowerBound + ": " + lifetime );
396
396
ctx .assertTrue (lifetime <= upperBound , "Was expecting connection to be closed in less than " + upperBound + ": " + lifetime );
397
397
latch .complete ();
@@ -405,7 +405,7 @@ public void testPoolMaxLifetime(TestContext ctx) {
405
405
listenLatch .awaitSuccess (20_000 );
406
406
407
407
poolOptions
408
- .setPoolCleanerPeriod (pooleCleanerPeriod )
408
+ .setPoolCleanerPeriod (poolCleanerPeriod )
409
409
.setIdleTimeout (0 )
410
410
.setMaxLifetime (maxLifetime )
411
411
.setMaxLifetimeUnit (TimeUnit .MILLISECONDS );
@@ -460,9 +460,9 @@ public void testPoolConnectTimeout(TestContext ctx) {
460
460
public void testNoConnectionLeaks (TestContext ctx ) {
461
461
Async killConnections = ctx .async ();
462
462
PgConnection .connect (vertx , options , ctx .asyncAssertSuccess (conn -> {
463
- Collector <Row , ?, List <Integer >> collector = mapping (row -> row .getInteger (0 ), toList ());
463
+ Collector <Row , ?, List <Boolean >> collector = mapping (row -> row .getBoolean (0 ), toList ());
464
464
String sql = "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = $1" ;
465
- PreparedQuery <SqlResult <List <Integer >>> preparedQuery = conn .preparedQuery (sql ).collecting (collector );
465
+ PreparedQuery <SqlResult <List <Boolean >>> preparedQuery = conn .preparedQuery (sql ).collecting (collector );
466
466
Tuple params = Tuple .of (options .getDatabase ());
467
467
preparedQuery .execute (params ).compose (cf -> conn .close ()).onComplete (ctx .asyncAssertSuccess (v -> killConnections .complete ()));
468
468
}));
0 commit comments