Skip to content

Commit 022d731

Browse files
committed
Close connection pool in test teardown
The pool in this test starts a background thread running, so by closing it we also shutdown that thread. JAVA-3643
1 parent 8ab8d53 commit 022d731

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver-core/src/test/unit/com/mongodb/internal/connection/AbstractConnectionPoolTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ public void tearDown() {
123123
for (ExecutorService cur : executorServiceMap.values()) {
124124
cur.shutdownNow();
125125
}
126+
if (pool != null) {
127+
pool.close();
128+
}
126129
}
127130

128131
@Test

0 commit comments

Comments
 (0)