Idle fill is now run by the housekeeping thread, rather than as a side-effect of addBagItem(), so for this test we need to set a short housekeeping period.

2.3.0
Brett Wooldridge 10 years ago
parent 3ccddff117
commit 684d0683e9

@ -224,6 +224,8 @@ public class TestConnectionTimeoutRetry
config.setConnectionTestQuery("VALUES 1");
config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource");
System.setProperty("com.zaxxer.hikari.housekeeping.periodMs", "100");
HikariDataSource ds = new HikariDataSource(config);
try {
@ -252,6 +254,7 @@ public class TestConnectionTimeoutRetry
Assert.assertSame("Idle connections not as expected", 10, TestElf.getPool(ds).getIdleConnections());
}
finally {
System.getProperties().remove("com.zaxxer.hikari.housekeeping.periodMs", "100");
ds.close();
}
}

Loading…
Cancel
Save