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 2017/11/02 16:35:35 UTC
[2/2] lucene-solr:branch_7x: SOLR-11072: Make the new test more
robust to side-effects from other tests in the suite.
SOLR-11072: Make the new test more robust to side-effects from other tests in the suite.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f48bfaea
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f48bfaea
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f48bfaea
Branch: refs/heads/branch_7x
Commit: f48bfaea4f51e9c77655cff270233f160c4934ac
Parents: 9c8ff08
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Thu Nov 2 17:34:05 2017 +0100
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Thu Nov 2 17:34:05 2017 +0100
----------------------------------------------------------------------
.../solr/cloud/autoscaling/TriggerIntegrationTest.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f48bfaea/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
index 591f8c3..68c1491 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
@@ -123,6 +123,7 @@ public class TriggerIntegrationTest extends SolrCloudTestCase {
actionInterrupted = new CountDownLatch(1);
actionCompleted = new CountDownLatch(1);
events.clear();
+ listenerEvents.clear();
// clear any persisted auto scaling configuration
Stat stat = zkClient().setData(SOLR_AUTOSCALING_CONF_PATH, Utils.toJSON(new ZkNodeProps()), true);
log.info(SOLR_AUTOSCALING_CONF_PATH + " reset, new znode version {}", stat.getVersion());
@@ -1256,9 +1257,9 @@ public class TriggerIntegrationTest extends SolrCloudTestCase {
String setListenerCommand1 = "{" +
"'set-listener' : " +
"{" +
- "'name' : 'foo'," +
+ "'name' : 'srt'," +
"'trigger' : 'search_rate_trigger'," +
- "'stage' : ['FAILED','SUCCEEDED', 'IGNORED']," +
+ "'stage' : ['FAILED','SUCCEEDED']," +
"'class' : '" + TestTriggerListener.class.getName() + "'" +
"}" +
"}";
@@ -1273,8 +1274,8 @@ public class TriggerIntegrationTest extends SolrCloudTestCase {
assertTrue("The trigger did not fire at all", await);
// wait for listener to capture the SUCCEEDED stage
Thread.sleep(2000);
- assertEquals(listenerEvents.toString(), 1, listenerEvents.get("foo").size());
- TestEvent ev = listenerEvents.get("foo").get(0);
+ assertEquals(listenerEvents.toString(), 1, listenerEvents.get("srt").size());
+ TestEvent ev = listenerEvents.get("srt").get(0);
long now = timeSource.getTime();
// verify waitFor
assertTrue(TimeUnit.SECONDS.convert(waitForSeconds, TimeUnit.NANOSECONDS) < now - ev.event.getEventTime());