Use at least 2 docs to see deleted docs

Closes #18623
This commit is contained in:
Simon Willnauer 2016-05-28 08:14:49 +02:00
parent fbd3f8df2b
commit 32e9a879b4
2 changed files with 2 additions and 2 deletions

View File

@ -2184,7 +2184,7 @@ public class InternalEngineTests extends ESTestCase {
}
public void testDocStats() throws IOException {
final int numDocs = randomIntBetween(1, 10);
final int numDocs = randomIntBetween(2, 10); // at least 2 documents otherwise we don't see any deletes below
for (int i = 0; i < numDocs; i++) {
ParsedDocument doc = testParsedDocument(Integer.toString(i), Integer.toString(i), "test", null, -1, -1, testDocument(), new BytesArray("{}"), null);
Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime());

View File

@ -986,7 +986,7 @@ public class ShadowEngineTests extends ESTestCase {
}
public void testDocStats() throws IOException {
final int numDocs = randomIntBetween(1, 10);
final int numDocs = randomIntBetween(2, 10); // at least 2 documents otherwise we don't see any deletes below
for (int i = 0; i < numDocs; i++) {
ParsedDocument doc = testParsedDocument(Integer.toString(i), Integer.toString(i), "test", null, -1, -1, testDocument(), new BytesArray("{}"), null);
Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime());