mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正因为SqlStat OOM防止措施导致的空指针问题
This commit is contained in:
@@ -49,6 +49,7 @@ public class TestPoolPreparedStatement extends TestCase {
|
||||
Connection conn = dataSource.getConnection();
|
||||
PreparedStatement stmt = conn.prepareStatement("SELECT ?");
|
||||
raw = stmt.unwrap(MockPreparedStatement.class);
|
||||
stmt.execute();
|
||||
stmt.close();
|
||||
conn.close();
|
||||
}
|
||||
@@ -57,6 +58,7 @@ public class TestPoolPreparedStatement extends TestCase {
|
||||
Connection conn = dataSource.getConnection();
|
||||
PreparedStatement stmt = conn.prepareStatement("SELECT ?");
|
||||
Assert.assertTrue(raw == stmt.unwrap(MockPreparedStatement.class));
|
||||
stmt.execute();
|
||||
stmt.close();
|
||||
conn.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user