From 18f02eb851f7ce0d6ea25b93cb00898a702a59ce Mon Sep 17 00:00:00 2001 From: markharwood Date: Mon, 23 Aug 2021 16:26:04 +0100 Subject: [PATCH] Test fix -WildcardFieldMapperTests bad test data. (#76819) (#76836) 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 742109821bd33..986aaca73c3b4 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 @@ -131,7 +131,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);