提交 1e8a3a2e 编写于 作者: Z zyyang

change

上级 c91bfcf4
...@@ -19,7 +19,7 @@ public class AppMemoryLeakTest { ...@@ -19,7 +19,7 @@ public class AppMemoryLeakTest {
} }
} }
@Test(expected = OutOfMemoryError.class) @Test
public void testCreateTooManyStatement() throws ClassNotFoundException, SQLException { public void testCreateTooManyStatement() throws ClassNotFoundException, SQLException {
Class.forName("com.taosdata.jdbc.TSDBDriver"); Class.forName("com.taosdata.jdbc.TSDBDriver");
int stmtCnt = 0; int stmtCnt = 0;
...@@ -30,15 +30,4 @@ public class AppMemoryLeakTest { ...@@ -30,15 +30,4 @@ public class AppMemoryLeakTest {
} }
} }
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("com.taosdata.jdbc.TSDBDriver");
int stmtCnt = 0;
Connection conn = DriverManager.getConnection("jdbc:TAOS://localhost:6030/?user=root&password=taosdata");
while (true) {
Statement stmt = conn.createStatement();
System.out.println(++stmtCnt + " : " + stmt);
}
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册