Fix an occasional test error caused by the maintenance trigger generating events.

This commit is contained in:
Andrzej Bialecki 2019-12-16 13:53:22 +01:00
parent 7dfea5fe33
commit 83800c03df
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,7 @@ import org.apache.solr.client.solrj.cloud.autoscaling.Suggester;
import org.apache.solr.client.solrj.cloud.autoscaling.Suggestion;
import org.apache.solr.client.solrj.cloud.autoscaling.VersionedData;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.cloud.CloudTestUtils;
import org.apache.solr.cloud.SolrCloudTestCase;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.Replica;
@ -81,6 +82,9 @@ public class TestSnapshotCloudManager extends SolrCloudTestCase {
.process(cluster.getSolrClient());
realManager = cluster.getJettySolrRunner(cluster.getJettySolrRunners().size() - 1).getCoreContainer()
.getZkController().getSolrCloudManager();
// disable .scheduled_maintenance (once it exists)
CloudTestUtils.waitForTriggerToBeScheduled(realManager, ".scheduled_maintenance");
CloudTestUtils.suspendTrigger(realManager, ".scheduled_maintenance");
}
@AfterClass