mirror of https://github.com/apache/lucene.git
SOLR-10164: DistributedVersionInfoTest needs to be hardened.
This commit is contained in:
parent
57c41e1cbd
commit
fad963cf2f
|
@ -201,10 +201,13 @@ public class DistributedVersionInfoTest extends SolrCloudTestCase {
|
||||||
Thread.sleep(rand.nextInt(50)+1);
|
Thread.sleep(rand.nextInt(50)+1);
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
|
|
||||||
int docToDelete = rand.nextInt(docsSent.get())+1;
|
int ds = docsSent.get();
|
||||||
if (!deletedDocs.contains(docToDelete)) {
|
if (ds > 0) {
|
||||||
delI(String.valueOf(docToDelete));
|
int docToDelete = rand.nextInt(ds) + 1;
|
||||||
deletedDocs.add(docToDelete);
|
if (!deletedDocs.contains(docToDelete)) {
|
||||||
|
delI(String.valueOf(docToDelete));
|
||||||
|
deletedDocs.add(docToDelete);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ import org.junit.Before;
|
||||||
*/
|
*/
|
||||||
public class SolrCloudTestCase extends SolrTestCaseJ4 {
|
public class SolrCloudTestCase extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
public static final int DEFAULT_TIMEOUT = 60;
|
public static final int DEFAULT_TIMEOUT = 90;
|
||||||
|
|
||||||
private static class Config {
|
private static class Config {
|
||||||
final String name;
|
final String name;
|
||||||
|
|
Loading…
Reference in New Issue