change
This commit is contained in:
parent
89a0add293
commit
89ab10f9ab
|
@ -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 {
|
||||||
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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue