mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fixed testcase
This commit is contained in:
@@ -99,10 +99,12 @@ public class PreparedStatementKeyTest extends TestCase {
|
||||
public void test_contains() throws Exception {
|
||||
DruidDataSource dataSource = new DruidDataSource();
|
||||
PreparedStatementKey k1 = new PreparedStatementKey("x1", "c1", MethodType.M1);
|
||||
|
||||
PreparedStatementPool pool = new PreparedStatementPool(new ConnectionHolder(dataSource, null));
|
||||
MockPreparedStatement raw = new MockPreparedStatement(null, null);
|
||||
pool.put(new PreparedStatementHolder(k1, raw));
|
||||
|
||||
Assert.assertTrue(pool.get(k1) != null);
|
||||
Assert.assertTrue(pool.get(k1) != null);
|
||||
Assert.assertTrue(pool.get(k1) == null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user