mirror of https://github.com/apache/lucene.git
tests: only add a delete if the doc add did not fail
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1427618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fc4ed67dc2
commit
6b6d1f65c2
|
@ -1156,6 +1156,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
|
||||
while (true && !stop) {
|
||||
++i;
|
||||
boolean addFailed = false;
|
||||
|
||||
if (doDeletes && random().nextBoolean() && deletes.size() > 0) {
|
||||
Integer delete = deletes.remove(0);
|
||||
|
@ -1179,6 +1180,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
indexr(id, i, i1, 50, tlong, 50, t1,
|
||||
"to come to the aid of their country.");
|
||||
} catch (Exception e) {
|
||||
addFailed = true;
|
||||
System.err.println("REQUEST FAILED:");
|
||||
e.printStackTrace();
|
||||
if (e instanceof SolrServerException) {
|
||||
|
@ -1188,7 +1190,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
fails.incrementAndGet();
|
||||
}
|
||||
|
||||
if (doDeletes && random().nextBoolean()) {
|
||||
if (!addFailed && doDeletes && random().nextBoolean()) {
|
||||
deletes.add(i);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue