mirror of
https://github.com/apache/lucene.git
synced 2025-02-09 19:45:22 +00:00
SOLR-4509: Fix test failures with Java 9 module system by doing a correct cleanup
This commit is contained in:
parent
f8ea8b855e
commit
d0156b1126
@ -91,12 +91,12 @@ public class TestCloudDeleteByQuery extends SolrCloudTestCase {
|
|||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
private static void afterClass() throws Exception {
|
private static void afterClass() throws Exception {
|
||||||
CLOUD_CLIENT.close();
|
CLOUD_CLIENT.close(); CLOUD_CLIENT = null;
|
||||||
S_ONE_LEADER_CLIENT.close();
|
S_ONE_LEADER_CLIENT.close(); S_ONE_LEADER_CLIENT = null;
|
||||||
S_TWO_LEADER_CLIENT.close();
|
S_TWO_LEADER_CLIENT.close(); S_TWO_LEADER_CLIENT = null;
|
||||||
S_ONE_NON_LEADER_CLIENT.close();
|
S_ONE_NON_LEADER_CLIENT.close(); S_ONE_NON_LEADER_CLIENT = null;
|
||||||
S_TWO_NON_LEADER_CLIENT.close();
|
S_TWO_NON_LEADER_CLIENT.close(); S_TWO_NON_LEADER_CLIENT = null;
|
||||||
NO_COLLECTION_CLIENT.close();
|
NO_COLLECTION_CLIENT.close(); NO_COLLECTION_CLIENT = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
@ -206,11 +206,12 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
|
|||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void afterClass() throws IOException {
|
public static void afterClass() throws IOException {
|
||||||
close(S_ONE_LEADER_CLIENT);
|
close(S_ONE_LEADER_CLIENT); S_ONE_LEADER_CLIENT = null;
|
||||||
close(S_TWO_LEADER_CLIENT);
|
close(S_TWO_LEADER_CLIENT); S_TWO_LEADER_CLIENT = null;
|
||||||
close(S_ONE_NON_LEADER_CLIENT);
|
close(S_ONE_NON_LEADER_CLIENT); S_ONE_NON_LEADER_CLIENT = null;
|
||||||
close(S_TWO_NON_LEADER_CLIENT);
|
close(S_TWO_NON_LEADER_CLIENT); S_TWO_NON_LEADER_CLIENT = null;
|
||||||
close(NO_COLLECTION_CLIENT);
|
close(NO_COLLECTION_CLIENT); NO_COLLECTION_CLIENT = null;
|
||||||
|
close(CLOUD_CLIENT); CLOUD_CLIENT = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void close(SolrClient client) throws IOException {
|
private static void close(SolrClient client) throws IOException {
|
||||||
|
@ -138,6 +138,11 @@ public class TestTolerantUpdateProcessorRandomCloud extends SolrCloudTestCase {
|
|||||||
client.close();
|
client.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
NODE_CLIENTS = null;
|
||||||
|
if (CLOUD_CLIENT != null) {
|
||||||
|
CLOUD_CLIENT.close();
|
||||||
|
}
|
||||||
|
CLOUD_CLIENT = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRandomUpdates() throws Exception {
|
public void testRandomUpdates() throws Exception {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user