Skip to content

Commit 4492fac

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 c72808f commit 4492fac

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/ConnectionPoolTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ public void tearDown() {
113113
for (ExecutorService cur : executorServiceMap.values()) {
114114
cur.shutdownNow();
115115
}
116+
if (pool != null) {
117+
pool.close();
118+
}
116119
}
117120

118121
@Test

0 commit comments

Comments
 (0)