tests: speed test up a bit

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1452113 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-03-03 19:42:31 +00:00
parent 7a28af4462
commit 61eca4446b
2 changed files with 6 additions and 4 deletions

View File

@ -62,7 +62,7 @@ public class RecoveryZkTest extends AbstractFullDistribZkTestBase {
indexThread2.start(); indexThread2.start();
// give some time to index... // give some time to index...
int[] waitTimes = new int[] {2000, 3000, 5000}; int[] waitTimes = new int[] {200, 2000, 3000};
Thread.sleep(waitTimes[random().nextInt(waitTimes.length - 1)]); Thread.sleep(waitTimes[random().nextInt(waitTimes.length - 1)]);
// bring shard replica down // bring shard replica down
@ -79,9 +79,6 @@ public class RecoveryZkTest extends AbstractFullDistribZkTestBase {
Thread.sleep(3000); Thread.sleep(3000);
ZkStateReader zkStateReader = cloudClient.getZkStateReader(); ZkStateReader zkStateReader = cloudClient.getZkStateReader();
// give some time for replication to complete
Thread.sleep(5000);
// stop indexing threads // stop indexing threads
indexThread.safeStop(); indexThread.safeStop();
indexThread2.safeStop(); indexThread2.safeStop();

View File

@ -1208,6 +1208,11 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
deletes.add(i); deletes.add(i);
} }
try {
Thread.currentThread().sleep(random().nextInt(100));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
} }
System.err.println("added docs:" + numAdds + " with " + fails + " fails" System.err.println("added docs:" + numAdds + " with " + fails + " fails"