Skip to content

Commit 19686de

Browse files
authored
[8.2] Fix Enrich*IT test failures (#87317) (#87349)
* Fix Enrich*IT test failures (#87317) Fix EnrichIT, EnrichSecurityIT and EnrichAdvancedSecurityIT test failures caused by a warning being emitted during auto creation of 'my-index' index. The warning has nothing to do with the index being created, but the monitor index being created at the same time (in same cluster state update) triggers a warning and that leaks to the index response in this test, which causes test failures. Closes #83366 Relates to #85506 * fixed compile error
1 parent c880e25 commit 19686de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x-pack/plugin/enrich/qa/common/src/main/java/org/elasticsearch/test/enrich/CommonEnrichRestTestCase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ private void setupGenericLifecycleTest(String field, String type, String value)
137137
assertOK(client().performRequest(putPipelineRequest));
138138
cleanupPipelineAfterTest("my_pipeline");
139139

140+
// Create index before indexing, so that we avoid a warning from being emitted that can fail this test.
141+
// (If during auto index creation, the creation of my-index index happens together with monitoring index then
142+
// a 'starts with a dot '.', in the next major version' warning from creating monitor index is also returned
143+
// in the index response, because both indices were created in the same cluster state update.)
144+
// (This workaround, specifically using create index api to pre-create the my-index index ensures that this
145+
// index is created in isolation and warnings of other indices that may be created will not be returned)
146+
// (Go to elastic/elasticsearch#85506 for more details)
147+
createIndex("my-index", Settings.EMPTY);
140148
// Index document using pipeline with enrich processor:
141149
indexRequest = new Request("PUT", "/my-index/_doc/1");
142150
indexRequest.addParameter("pipeline", "my_pipeline");

0 commit comments

Comments
 (0)