We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 41afa7d + c6f6504 commit d7978d6Copy full SHA for d7978d6
src/test/java/org/apache/ibatis/datasource/pooled/PooledDataSourceTest.java
@@ -67,16 +67,19 @@ void shouldBlockUntilConnectionIsAvailableInPooledDataSource() throws Exception
67
@Test
68
void PoppedConnectionShouldBeNotEqualToClosedConnection() throws Exception {
69
Connection connectionToClose = dataSource.getConnection();
70
+ CountDownLatch latch = new CountDownLatch(1);
71
72
new Thread(() -> {
73
try {
74
+ latch.await();
75
assertNotEquals(connectionToClose, dataSource.getConnection());
76
} catch (Exception e) {
77
throw new RuntimeException(e);
78
}
79
}).start();
80
81
connectionToClose.close();
82
+ latch.countDown();
83
84
85
0 commit comments