[TD-2132]<test>: add memory leak test case

This commit is contained in:
zyyang 2020-11-24 18:34:02 +08:00
parent 5a7b938b9d
commit 19dedc226a
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package com.taosdata.jdbc.cases;
import org.junit.Test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class AppMemoryLeakTest {
@Test
public void testAppMemoryLeak() {
try {
Class.forName("com.taosdata.jdbc.TSDBDriver");
while (true) {
DriverManager.getConnection("jdbc:TAOS://localhost:6030/?user=root&password=taosdata");
}
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
}
}