From 9a1222efc51f391e009b5431dc71ef87cf2bf311 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Sun, 29 Jan 2012 02:12:00 +0000 Subject: [PATCH] SOLR-3063: Bug in LeaderElectionIntgrationTest git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1237193 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/solr/cloud/AbstractZkTestCase.java | 2 +- .../org/apache/solr/cloud/LeaderElectionIntegrationTest.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/AbstractZkTestCase.java b/solr/core/src/test/org/apache/solr/cloud/AbstractZkTestCase.java index 1cd542f5c7a..fadc150079a 100644 --- a/solr/core/src/test/org/apache/solr/cloud/AbstractZkTestCase.java +++ b/solr/core/src/test/org/apache/solr/cloud/AbstractZkTestCase.java @@ -102,7 +102,7 @@ public abstract class AbstractZkTestCase extends SolrTestCaseJ4 { private static void putConfig(SolrZkClient zkClient, final String name) throws Exception { zkClient.makePath("/configs/conf1/" + name, getFile("solr" - + File.separator + "conf" + File.separator + name), false, false); + + File.separator + "conf" + File.separator + name), false, true); } @Override diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java index d5c6bee8971..b352f365863 100644 --- a/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/LeaderElectionIntegrationTest.java @@ -100,7 +100,7 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 { AbstractZkTestCase.TIMEOUT); reader = new ZkStateReader(zkClient); - + reader.createClusterStateWatchersAndUpdate(); log.info("####SETUP_END " + getName()); } @@ -217,7 +217,6 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 { private String getLeader() throws InterruptedException, KeeperException { - reader.updateCloudState(true); ZkNodeProps props = reader.getLeaderProps("collection1", "shard1", 30000); String leader = props.get(ZkStateReader.NODE_NAME_PROP);