From 83800c03dfe7809c3621b38dc54c7953714c7eaa Mon Sep 17 00:00:00 2001 From: Andrzej Bialecki Date: Mon, 16 Dec 2019 13:53:22 +0100 Subject: [PATCH] Fix an occasional test error caused by the maintenance trigger generating events. --- .../solr/cloud/autoscaling/sim/TestSnapshotCloudManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSnapshotCloudManager.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSnapshotCloudManager.java index a50a37706b9..adc41cccd8b 100644 --- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSnapshotCloudManager.java +++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSnapshotCloudManager.java @@ -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