mirror of https://github.com/apache/lucene.git
tweak test and pull atLeast() out of for loop
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1236968 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ece30470f2
commit
7a0a470401
|
@ -288,13 +288,13 @@ public class LeaderElectionTest extends SolrTestCaseJ4 {
|
|||
threads.add(thread1);
|
||||
scheduler.schedule(thread1, 0, TimeUnit.MILLISECONDS);
|
||||
|
||||
Thread.sleep(4000);
|
||||
Thread.sleep(2000);
|
||||
|
||||
Thread scheduleThread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
for (int i = 1; i < atLeast(15); i++) {
|
||||
int count = atLeast(5);
|
||||
for (int i = 1; i < count; i++) {
|
||||
int launchIn = random.nextInt(500);
|
||||
ClientThread thread = null;
|
||||
try {
|
||||
|
@ -369,7 +369,7 @@ public class LeaderElectionTest extends SolrTestCaseJ4 {
|
|||
connLossThread.start();
|
||||
killThread.start();
|
||||
|
||||
Thread.sleep(6000);
|
||||
Thread.sleep(4000);
|
||||
|
||||
stopStress = true;
|
||||
|
||||
|
@ -385,7 +385,7 @@ public class LeaderElectionTest extends SolrTestCaseJ4 {
|
|||
|
||||
int seq = threads.get(getLeaderThread()).getSeq();
|
||||
|
||||
assertFalse("seq is -1 and we may have a zombie leader", seq == -1);
|
||||
// we have a leader we know, TODO: lets check some other things
|
||||
|
||||
// cleanup any threads still running
|
||||
for (ClientThread thread : threads) {
|
||||
|
|
Loading…
Reference in New Issue