From 408232635a43dff3946b2ed82e9d0c7e0577e308 Mon Sep 17 00:00:00 2001 From: Andrzej Bialecki Date: Wed, 19 Sep 2018 11:57:39 +0200 Subject: [PATCH] Fix occasional test failure due to a missing trigger config. --- .../cloud/autoscaling/sim/TestSimTriggerIntegration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimTriggerIntegration.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimTriggerIntegration.java index dded18c8736..8acab5fd796 100644 --- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimTriggerIntegration.java +++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimTriggerIntegration.java @@ -127,7 +127,10 @@ public class TestSimTriggerIntegration extends SimSolrCloudTestCase { SolrRequest req = createAutoScalingRequest(SolrRequest.METHOD.POST, suspendTriggerCommand); SolrClient solrClient = cluster.simGetSolrClient(); NamedList response = solrClient.request(req); - assertEquals(response.get("result").toString(), "success"); + String result = response.get("result").toString(); + if (!"success".equals(result) && !result.contains("No trigger exists")) { + fail("Unexpected response: " + result); + } waitForSeconds = 1 + random().nextInt(3); actionConstructorCalled = new CountDownLatch(1);