|
|
|
@ -26,7 +26,7 @@ public class RampUpDown
|
|
|
|
|
try (HikariDataSource ds = new HikariDataSource(config)) {
|
|
|
|
|
ds.setIdleTimeout(1000);
|
|
|
|
|
|
|
|
|
|
Assert.assertSame("Totals connections not as expected", 5, TestElf.getPool(ds).getTotalConnections());
|
|
|
|
|
Assert.assertSame("Total connections not as expected", 5, TestElf.getPool(ds).getTotalConnections());
|
|
|
|
|
|
|
|
|
|
Connection[] connections = new Connection[ds.getMaximumPoolSize()];
|
|
|
|
|
for (int i = 0; i < connections.length; i++)
|
|
|
|
@ -34,7 +34,7 @@ public class RampUpDown
|
|
|
|
|
connections[i] = ds.getConnection();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Assert.assertSame("Totals connections not as expected", 60, TestElf.getPool(ds).getTotalConnections());
|
|
|
|
|
Assert.assertSame("Total connections not as expected", 60, TestElf.getPool(ds).getTotalConnections());
|
|
|
|
|
|
|
|
|
|
for (Connection connection : connections)
|
|
|
|
|
{
|
|
|
|
@ -43,7 +43,7 @@ public class RampUpDown
|
|
|
|
|
|
|
|
|
|
Thread.sleep(2500);
|
|
|
|
|
|
|
|
|
|
Assert.assertSame("Totals connections not as expected", 5, TestElf.getPool(ds).getTotalConnections());
|
|
|
|
|
Assert.assertSame("Total connections not as expected", 5, TestElf.getPool(ds).getTotalConnections());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|