mirror of https://github.com/apache/lucene.git
Fix resource leak in TestPolicyCloud (#1312)
This commit is contained in:
parent
fa6166f261
commit
4d2d052b7d
|
@ -145,7 +145,7 @@ public class TestPolicyCloud extends SolrCloudTestCase {
|
|||
"}";
|
||||
AutoScalingConfig config = new AutoScalingConfig((Map<String, Object>) Utils.fromJSONString(autoScaleJson));
|
||||
AtomicInteger count = new AtomicInteger(0);
|
||||
SolrCloudManager cloudManager = new SolrClientCloudManager(new ZkDistributedQueueFactory(cluster.getZkClient()), cluster.getSolrClient());
|
||||
try (SolrCloudManager cloudManager = new SolrClientCloudManager(new ZkDistributedQueueFactory(cluster.getZkClient()), cluster.getSolrClient())) {
|
||||
String nodeName = cloudManager.getClusterStateProvider().getLiveNodes().iterator().next();
|
||||
SolrClientNodeStateProvider nodeStateProvider = (SolrClientNodeStateProvider) cloudManager.getNodeStateProvider();
|
||||
Map<String, Map<String, List<ReplicaInfo>>> result = nodeStateProvider.getReplicaInfo(nodeName, Collections.singleton("UPDATE./update.requests"));
|
||||
|
@ -172,7 +172,7 @@ public class TestPolicyCloud extends SolrCloudTestCase {
|
|||
}));
|
||||
}
|
||||
assertTrue(count.get() > 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static CollectionStatePredicate expectAllReplicasOnSpecificNode
|
||||
|
|
Loading…
Reference in New Issue