SOLR-3237: fix test, add more iterations when waiting for shardId

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1311670 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sami Siren 2012-04-10 10:44:11 +00:00
parent 56477c0b46
commit fb97a9e169
1 changed files with 5 additions and 5 deletions

View File

@ -93,7 +93,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
public void close(){ public void close(){
try { try {
deleteNode(ZkStateReader.LIVE_NODES_ZKNODE + "/" + "node1"); deleteNode(ZkStateReader.LIVE_NODES_ZKNODE + "/" + nodeName);
zkClient.close(); zkClient.close();
} catch (InterruptedException e) { } catch (InterruptedException e) {
//e.printStackTrace(); //e.printStackTrace();
@ -127,7 +127,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
ZkStateReader.toJSON(coreStates.values().toArray( ZkStateReader.toJSON(coreStates.values().toArray(
new CoreState[coreStates.size()])), true); new CoreState[coreStates.size()])), true);
for (int i = 0; i < 10; i++) { for (int i = 0; i < 30; i++) {
String shardId = getShardId(coreName); String shardId = getShardId(coreName);
if (shardId != null) { if (shardId != null) {
try { try {
@ -154,9 +154,9 @@ public class OverseerTest extends SolrTestCaseJ4 {
collection); collection);
if (slices != null) { if (slices != null) {
for (Slice slice : slices.values()) { for (Slice slice : slices.values()) {
if (slice.getShards().containsKey(nodeName + "_" + coreName)) if (slice.getShards().containsKey(nodeName + "_" + coreName)) {
; return slice.getName();
return slice.getName(); }
} }
} }
return null; return null;