tests: attempt to harden for apache jenkins

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1426002 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-26 19:52:34 +00:00
parent 936a67bb7d
commit 5772204892
1 changed files with 6 additions and 0 deletions

View File

@ -242,12 +242,18 @@ public class SyncSliceTest extends AbstractFullDistribZkTestBase {
shardFailMessage = pollConsistency(shardFailMessage, 0);
shardFailMessage = pollConsistency(shardFailMessage, 3000);
shardFailMessage = pollConsistency(shardFailMessage, 5000);
shardFailMessage = pollConsistency(shardFailMessage, 8000);
return shardFailMessage;
}
private String pollConsistency(String shardFailMessage, int sleep)
throws InterruptedException, Exception {
try {
commit();
} catch (Throwable t) {
t.printStackTrace();
}
if (shardFailMessage == null) {
// try again
Thread.sleep(sleep);