Skip to content

Commit 184faba

Browse files
committed
Not!
1 parent 8f7b618 commit 184faba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,14 @@ public void testPrimaryFillsSeqNoGapsOnPromotion() throws Exception {
401401
for (int i = 0; i < operations; i++) {
402402
final String id = Integer.toString(i);
403403
final ParsedDocument doc = testParsedDocument(id, "test", null, new ParseContext.Document(), new BytesArray("{}"), null);
404-
if (rarely()) {
405-
gap = true;
404+
if (!rarely()) {
406405
final Term uid = new Term("_id", doc.id());
407406
final Engine.Index index =
408407
new Engine.Index(uid, doc, i, indexShard.getPrimaryTerm(), 1, EXTERNAL, REPLICA, System.nanoTime(), -1, false);
409408
indexShard.index(index);
410409
max = i;
410+
} else {
411+
gap = true;
411412
}
412413
}
413414

0 commit comments

Comments
 (0)