From d9fa53b9a8eda0329d8d04b8f2261275c72b0cbe Mon Sep 17 00:00:00 2001 From: markharwood Date: Mon, 23 Aug 2021 15:08:01 +0100 Subject: [PATCH] Test fix -WildcardFieldMapperTests bad test data. (#76819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seed produced a random document field value that didn’t produce any of the characters we were searching for. Closes #76811 --- .../xpack/wildcard/mapper/WildcardFieldMapperTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/wildcard/src/test/java/org/elasticsearch/xpack/wildcard/mapper/WildcardFieldMapperTests.java b/x-pack/plugin/wildcard/src/test/java/org/elasticsearch/xpack/wildcard/mapper/WildcardFieldMapperTests.java index 7407cd210ab30..5c6a6b1b7c9a7 100644 --- a/x-pack/plugin/wildcard/src/test/java/org/elasticsearch/xpack/wildcard/mapper/WildcardFieldMapperTests.java +++ b/x-pack/plugin/wildcard/src/test/java/org/elasticsearch/xpack/wildcard/mapper/WildcardFieldMapperTests.java @@ -130,7 +130,7 @@ public void testTooBigKeywordField() throws IOException { RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc); // Create a string that is too large and will not be indexed - String docContent = randomABString(MAX_FIELD_LENGTH + 1); + String docContent = "a" + randomABString(MAX_FIELD_LENGTH); Document doc = new Document(); LuceneDocument parseDoc = new LuceneDocument(); addFields(parseDoc, doc, docContent);