Skip to content

Commit 511d587

Browse files
author
Hendrik Muhs
authored
[Transform] wait for transform templates in Rest integration t… (#53330)
add transform templates to the list of templates to be installed before executing tests
1 parent 7b2c396 commit 511d587

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package org.elasticsearch.xpack.test.rest;
77

88
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
9+
910
import org.apache.http.HttpStatus;
1011
import org.elasticsearch.ElasticsearchException;
1112
import org.elasticsearch.common.CheckedFunction;
@@ -24,6 +25,7 @@
2425
import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndexFields;
2526
import org.elasticsearch.xpack.core.ml.notifications.NotificationsIndex;
2627
import org.elasticsearch.xpack.core.rollup.job.RollupJob;
28+
import org.elasticsearch.xpack.core.transform.transforms.persistence.TransformInternalIndexConstants;
2729
import org.junit.After;
2830
import org.junit.Before;
2931

@@ -75,7 +77,7 @@ public void setupForTests() throws Exception {
7577
}
7678

7779
/**
78-
* Waits for the Security template and the Machine Learning templates to be created by the {@link MetaDataUpgrader}
80+
* Waits for Machine Learning and Transform templates to be created by the {@link MetaDataUpgrader}
7981
*/
8082
private void waitForTemplates() throws Exception {
8183
if (installTemplates()) {
@@ -86,7 +88,10 @@ private void waitForTemplates() throws Exception {
8688
MlMetaIndex.INDEX_NAME,
8789
AnomalyDetectorsIndexFields.STATE_INDEX_PREFIX,
8890
AnomalyDetectorsIndex.jobResultsIndexPrefix(),
89-
AnomalyDetectorsIndex.configIndexName()));
91+
AnomalyDetectorsIndex.configIndexName(),
92+
TransformInternalIndexConstants.AUDIT_INDEX,
93+
TransformInternalIndexConstants.LATEST_INDEX_NAME
94+
));
9095

9196
for (String template : templates) {
9297
awaitCallApi("indices.exists_template", singletonMap("name", template), emptyList(),

0 commit comments

Comments
 (0)