You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/12/11 09:27:47 UTC
[18/47] lucene-solr:jira/http2: SOLR-12923: Harden
TestSimTriggerIntegration.testNodeMarkersRegistration.
SOLR-12923: Harden TestSimTriggerIntegration.testNodeMarkersRegistration.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4133ce4c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4133ce4c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4133ce4c
Branch: refs/heads/jira/http2
Commit: 4133ce4cc167a80ed20f7763de4b4a8ab5d0316f
Parents: 3eb2612
Author: markrmiller <ma...@apache.org>
Authored: Sun Dec 9 15:10:12 2018 -0600
Committer: markrmiller <ma...@apache.org>
Committed: Sun Dec 9 18:31:28 2018 -0600
----------------------------------------------------------------------
.../autoscaling/sim/TestSimTriggerIntegration.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4133ce4c/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimTriggerIntegration.java
----------------------------------------------------------------------
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 1b177f9..8f37ddb 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
@@ -20,6 +20,7 @@ package org.apache.solr.cloud.autoscaling.sim;
import static org.apache.solr.cloud.autoscaling.AutoScalingHandlerTest.createAutoScalingRequest;
import static org.apache.solr.cloud.autoscaling.ScheduledTriggers.DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS;
+import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.Collections;
@@ -66,6 +67,7 @@ import org.apache.solr.common.util.TimeSource;
import org.apache.solr.core.SolrResourceLoader;
import org.apache.solr.util.LogLevel;
import org.apache.solr.util.TimeOut;
+import org.apache.zookeeper.KeeperException;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -848,7 +850,19 @@ public class TestSimTriggerIntegration extends SimSolrCloudTestCase {
cluster.getTimeSource().sleep(5000);
// verify that a znode does NOT exist - there's no nodeLost trigger,
// so the new overseer cleaned up existing nodeLost markers
+
String pathLost = ZkStateReader.SOLR_AUTOSCALING_NODE_LOST_PATH + "/" + overseerLeader;
+
+ TimeOut timeout = new TimeOut(30, TimeUnit.SECONDS, TimeSource.NANO_TIME);
+ timeout.waitFor("Path " + pathLost + " exists", () -> {
+ try {
+ return !cluster.getDistribStateManager().hasData(pathLost);
+ } catch (IOException | KeeperException | InterruptedException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ });
+
assertFalse("Path " + pathLost + " exists", cluster.getDistribStateManager().hasData(pathLost));
listener.reset();