Skip to content

Commit 5e159c3

Browse files
committed
Restore the explicit closes on solr clients to prevent resource starvation when running tests many times
1 parent d5cfabd commit 5e159c3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,15 @@ public static void createThings() throws Exception {
8787
}
8888

8989
@AfterClass
90-
public static void destroyThings() {
91-
collection1 = null;
92-
collection2 = null;
90+
public static void destroyThings() throws IOException {
91+
if (collection1 != null) {
92+
collection1.close();
93+
collection1 = null;
94+
}
95+
if (collection2 != null) {
96+
collection2.close();
97+
collection2 = null;
98+
}
9399
resetExceptionIgnores();
94100
systemClearPropertySolrEnableUrlAllowList();
95101
}

0 commit comments

Comments
 (0)