raise timeout and try to un-ignore this test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1236250 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-01-26 15:45:49 +00:00
parent 6c3b8b5b02
commit 228a324062
1 changed files with 2 additions and 5 deletions

View File

@ -32,15 +32,12 @@ import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.common.cloud.ZkCoreNodeProps; import org.apache.solr.common.cloud.ZkCoreNodeProps;
import org.apache.solr.common.cloud.ZkNodeProps; import org.apache.solr.common.cloud.ZkNodeProps;
import org.apache.solr.common.cloud.ZkStateReader; import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.core.SolrConfig;
import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.KeeperException.NoNodeException; import org.apache.zookeeper.KeeperException.NoNodeException;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
@Ignore
public class LeaderElectionTest extends SolrTestCaseJ4 { public class LeaderElectionTest extends SolrTestCaseJ4 {
static final int TIMEOUT = 30000; static final int TIMEOUT = 30000;
@ -156,7 +153,7 @@ public class LeaderElectionTest extends SolrTestCaseJ4 {
private String getLeaderUrl(final String collection, final String slice) private String getLeaderUrl(final String collection, final String slice)
throws KeeperException, InterruptedException { throws KeeperException, InterruptedException {
int iterCount = 30; int iterCount = 60;
while (iterCount-- > 0) while (iterCount-- > 0)
try { try {
byte[] data = zkClient.getData( byte[] data = zkClient.getData(
@ -166,7 +163,7 @@ public class LeaderElectionTest extends SolrTestCaseJ4 {
ZkNodeProps.load(data)); ZkNodeProps.load(data));
return leaderProps.getCoreUrl(); return leaderProps.getCoreUrl();
} catch (NoNodeException e) { } catch (NoNodeException e) {
Thread.sleep(100); Thread.sleep(500);
} }
throw new RuntimeException("Could not get leader props"); throw new RuntimeException("Could not get leader props");
} }