git-svn-id: http://code.alibabatech.com/svn/druid/trunk@863 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-19 12:36:26 +00:00
parent 2d72077a14
commit 50369984ef
2 changed files with 7 additions and 0 deletions
@@ -61,6 +61,9 @@ public class TestCommit extends TestCase {
conn.setAutoCommit(false);
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
stmt.execute("SELECT 1");
stmt.close();
Assert.assertEquals(1, dataSource.getActiveConnectionStackTrace().size());
Assert.assertEquals(1, dataSource.getActiveConnections().size());
conn.rollback();
@@ -77,6 +77,10 @@ public class TestDataSourceBasic extends TestCase {
conn.setAutoCommit(false);
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
stmt.execute("SELECT 1");
stmt.close();
Assert.assertEquals(1, dataSource.getActiveConnectionStackTrace().size());
Assert.assertEquals(1, dataSource.getActiveConnections().size());
conn.commit();