From a538b76f6f1bb486aff903dce5f1511de868c5bb Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Fri, 27 Jul 2018 23:44:35 -0400 Subject: [PATCH] TEST: avoid merge in testSegmentMemoryTrackedInBreaker This commit indexes an extra document to avoid triggering merges. Relates LUCENE-8263 --- .../test/java/org/elasticsearch/index/shard/IndexShardTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java index 97ec88168f3..eaf9b7ee3e3 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java @@ -2979,6 +2979,7 @@ public class IndexShardTests extends IndexShardTestCase { assertThat(breaker.getUsed(), greaterThan(preRefreshBytes)); indexDoc(primary, "_doc", "4", "{\"foo\": \"potato\"}"); + indexDoc(primary, "_doc", "5", "{\"foo\": \"potato\"}"); // Forces a refresh with the INTERNAL scope ((InternalEngine) primary.getEngine()).writeIndexingBuffer();