You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2020/04/23 10:35:22 UTC
[lucene-solr] branch branch_8x updated: SOLR-12845: Properly clear
default policy between tests.
This is an automated email from the ASF dual-hosted git repository.
ab pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 789c97b SOLR-12845: Properly clear default policy between tests.
789c97b is described below
commit 789c97be5fb66b61210cff9dafb89daabec9fe39
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Thu Apr 23 12:34:28 2020 +0200
SOLR-12845: Properly clear default policy between tests.
---
.../org/apache/solr/cloud/autoscaling/TestPolicyCloud.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TestPolicyCloud.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TestPolicyCloud.java
index 4bf0357..910cb59 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TestPolicyCloud.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TestPolicyCloud.java
@@ -59,6 +59,7 @@ import org.apache.solr.common.util.TimeSource;
import org.apache.solr.common.util.Utils;
import org.apache.solr.util.TimeOut;
import org.junit.After;
+import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.rules.ExpectedException;
import org.slf4j.Logger;
@@ -80,14 +81,18 @@ public class TestPolicyCloud extends SolrCloudTestCase {
.configure();
}
+ @Before
+ public void before() throws Exception {
+ // remove default policy
+ String commands = "{set-cluster-policy : []}";
+ cluster.getSolrClient().request(AutoScalingRequest.create(SolrRequest.METHOD.POST, commands));
+ }
+
@After
public void after() throws Exception {
cluster.deleteAllCollections();
cluster.getSolrClient().getZkStateReader().getZkClient().setData(ZkStateReader.SOLR_AUTOSCALING_CONF_PATH,
"{}".getBytes(StandardCharsets.UTF_8), true);
- // remove default policy
- String commands = "{set-cluster-policy : []}";
- cluster.getSolrClient().request(AutoScalingRequest.create(SolrRequest.METHOD.POST, commands));
}
public void testCreateCollection() throws Exception {