The percentage of deleted docs needs to be strictly over 10% for deleted docs to be expunged.

This commit is contained in:
Adrien Grand 2016-12-30 11:18:02 +01:00
parent f1d7721932
commit 00de5b83bd
1 changed files with 1 additions and 1 deletions

View File

@ -1371,7 +1371,7 @@ public class IndexShardTests extends IndexShardTestCase {
final long numDocs = randomIntBetween(2, 32); // at least two documents so we have docs to delete
// Delete at least numDocs/10 documents otherwise the number of deleted docs will be below 10%
// and forceMerge will refuse to expunge deletes
final long numDocsToDelete = randomIntBetween((int) Math.ceil(numDocs / 10.0), Math.toIntExact(numDocs));
final long numDocsToDelete = randomIntBetween((int) Math.ceil(Math.nextUp(numDocs / 10.0)), Math.toIntExact(numDocs));
for (int i = 0; i < numDocs; i++) {
final String id = Integer.toString(i);
final ParsedDocument doc =