SOLR-10164: DistributedVersionInfoTest needs to be hardened.

This commit is contained in:
markrmiller 2017-02-19 16:34:33 -05:00
parent 57c41e1cbd
commit fad963cf2f
2 changed files with 8 additions and 5 deletions

View File

@ -201,10 +201,13 @@ public class DistributedVersionInfoTest extends SolrCloudTestCase {
Thread.sleep(rand.nextInt(50)+1);
} catch (InterruptedException e) {}
int docToDelete = rand.nextInt(docsSent.get())+1;
if (!deletedDocs.contains(docToDelete)) {
delI(String.valueOf(docToDelete));
deletedDocs.add(docToDelete);
int ds = docsSent.get();
if (ds > 0) {
int docToDelete = rand.nextInt(ds) + 1;
if (!deletedDocs.contains(docToDelete)) {
delI(String.valueOf(docToDelete));
deletedDocs.add(docToDelete);
}
}
}
}

View File

@ -70,7 +70,7 @@ import org.junit.Before;
*/
public class SolrCloudTestCase extends SolrTestCaseJ4 {
public static final int DEFAULT_TIMEOUT = 60;
public static final int DEFAULT_TIMEOUT = 90;
private static class Config {
final String name;