Skip to content

Commit 03bc368

Browse files
authored
Wait for ML templates after creating a new cluster in TooManyJobsIT (#54801)
1 parent 2b8a91b commit 03bc368

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.elasticsearch.common.unit.ByteSizeUnit;
1515
import org.elasticsearch.common.unit.ByteSizeValue;
1616
import org.elasticsearch.common.unit.TimeValue;
17+
import org.elasticsearch.persistent.PersistentTasksCustomMetadata;
1718
import org.elasticsearch.transport.TransportService;
1819
import org.elasticsearch.xpack.core.ml.MlTasks;
1920
import org.elasticsearch.xpack.core.ml.action.CloseJobAction;
@@ -23,14 +24,11 @@
2324
import org.elasticsearch.xpack.core.ml.job.config.Job;
2425
import org.elasticsearch.xpack.core.ml.job.config.JobState;
2526
import org.elasticsearch.xpack.core.ml.job.config.JobTaskState;
26-
import org.elasticsearch.persistent.PersistentTasksCustomMetadata;
2727
import org.elasticsearch.xpack.ml.MachineLearning;
2828
import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase;
29-
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
3029

3130
public class TooManyJobsIT extends BaseMlIntegTestCase {
3231

33-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/54162")
3432
public void testCloseFailedJob() throws Exception {
3533
startMlCluster(1, 1);
3634

@@ -76,6 +74,7 @@ public void testLazyNodeValidation() throws Exception {
7674
}
7775
logger.info("Started [{}] nodes", numNodes);
7876
ensureStableCluster(numNodes);
77+
ensureTemplatesArePresent();
7978
logger.info("[{}] is [{}]", MachineLearning.MAX_LAZY_ML_NODES.getKey(), maxNumberOfLazyNodes);
8079
// Set our lazy node number
8180
assertTrue(client().admin()
@@ -210,6 +209,7 @@ private void startMlCluster(int numNodes, int maxNumberOfWorkersPerNode) throws
210209
}
211210
logger.info("Started [{}] nodes", numNodes);
212211
ensureStableCluster(numNodes);
212+
ensureTemplatesArePresent();
213213
}
214214

215215
private long calculateMaxMlMemory() {

0 commit comments

Comments
 (0)