assertEquals("Number of connections active/busy should be "+con.length,con.length,datasource.getPool().getActive());
this.datasource.getPoolProperties().setRemoveAbandonedTimeout(1);
Thread.sleep(2500);
- this.assertTrue("Number of connections should be less than 50.", (datasource.getPool().getActive()<50));
+ assertTrue("Number of connections should be less than 50.", (datasource.getPool().getActive()<50));
this.datasource.getPoolProperties().setAbandonWhenPercentageFull(0);
Thread.sleep(2500);
assertEquals("Number of connections active/busy should be "+0,0,datasource.getPool().getActive());
this.datasource.getPoolProperties().setInitialSize(0);
try {
Future<Connection> cf = ((DataSourceProxy)datasource).getConnectionAsync();
- Connection con = cf.get(5, TimeUnit.SECONDS);
+ cf.get(5, TimeUnit.SECONDS);
}finally {
tearDown();
}
System.err.println("testWaitTimeInfinite() test is disabled.");
return;//this would lock up the test suite
}
+ /*
int wait = -1;
this.init();
this.datasource.setMaxActive(1);
assertTrue("Connection should have been acquired within +/- 1 second.",true);
}
con.close();
+ */
}