提交 89ab10f9 编写于 作者: Z zyyang

change

上级 89a0add2
...@@ -20,8 +20,9 @@ public class TaosInfoMonitorTest { ...@@ -20,8 +20,9 @@ public class TaosInfoMonitorTest {
List<Connection> connectionList = IntStream.range(0, 100).mapToObj(i -> { List<Connection> connectionList = IntStream.range(0, 100).mapToObj(i -> {
try { try {
TimeUnit.SECONDS.sleep(1);
return DriverManager.getConnection(url); return DriverManager.getConnection(url);
} catch (SQLException e) { } catch (SQLException | InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
return null; return null;
...@@ -29,7 +30,8 @@ public class TaosInfoMonitorTest { ...@@ -29,7 +30,8 @@ public class TaosInfoMonitorTest {
connectionList.stream().forEach(conn -> { connectionList.stream().forEach(conn -> {
try { try {
conn.close(); conn.close();
} catch (SQLException e) { TimeUnit.SECONDS.sleep(1);
} catch (SQLException | InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册