提交 b5eebd09 编写于 作者: Z zyyang

change

上级 89ab10f9
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<commons-logging.version>1.1.2</commons-logging.version> <commons-logging.version>1.1.2</commons-logging.version>
<commons-lang3.version>3.5</commons-lang3.version> <commons-lang3.version>3.5</commons-lang3.version>
<maven.test.jvmargs></maven.test.jvmargs>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
...@@ -122,6 +123,8 @@ ...@@ -122,6 +123,8 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version> <version>2.12.4</version>
<configuration> <configuration>
<forkMode>pretest</forkMode>
<argLine>${maven.test.jvmargs}</argLine>
<includes> <includes>
<include>**/*Test.java</include> <include>**/*Test.java</include>
</includes> </includes>
......
...@@ -13,9 +13,8 @@ import java.util.stream.IntStream; ...@@ -13,9 +13,8 @@ import java.util.stream.IntStream;
public class TaosInfoMonitorTest { public class TaosInfoMonitorTest {
@Test @Test
public void testCreateTooManyConnection() throws ClassNotFoundException, SQLException, InterruptedException { public void testCreateTooManyConnection() throws ClassNotFoundException {
Class.forName("com.taosdata.jdbc.TSDBDriver"); Class.forName("com.taosdata.jdbc.TSDBDriver");
int conCnt = 0;
final String url = "jdbc:TAOS://127.0.0.1:6030/?user=root&password=taosdata"; final String url = "jdbc:TAOS://127.0.0.1:6030/?user=root&password=taosdata";
List<Connection> connectionList = IntStream.range(0, 100).mapToObj(i -> { List<Connection> connectionList = IntStream.range(0, 100).mapToObj(i -> {
...@@ -27,6 +26,7 @@ public class TaosInfoMonitorTest { ...@@ -27,6 +26,7 @@ public class TaosInfoMonitorTest {
} }
return null; return null;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
connectionList.stream().forEach(conn -> { connectionList.stream().forEach(conn -> {
try { try {
conn.close(); conn.close();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册