Skip to content

Commit 84f1f87

Browse files
authored
[ML] Fix JobsAndModelsIT (elastic#137084) (elastic#137102)
This PR removes assertion assertRecentLastTaskStateChangeTime at the end of the test. This assertion is not required for the core purpose of the test to verify that: Jobs and models don't get allocated to the same node when they don't fit Both eventually get allocated to different nodes when capacity allows At the same time, it introduce the dependency on how busy the CI is when running the test.
1 parent 273fd6c commit 84f1f87

File tree

1 file changed

+0
-6
lines changed
  • x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration

1 file changed

+0
-6
lines changed

x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/JobsAndModelsIT.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.elasticsearch.test.ESIntegTestCase;
1717
import org.elasticsearch.xcontent.XContentBuilder;
1818
import org.elasticsearch.xcontent.json.JsonXContent;
19-
import org.elasticsearch.xpack.core.ml.MlTasks;
2019
import org.elasticsearch.xpack.core.ml.action.CloseJobAction;
2120
import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction;
2221
import org.elasticsearch.xpack.core.ml.action.GetTrainedModelsStatsAction;
@@ -38,8 +37,6 @@
3837
import org.elasticsearch.xpack.ml.inference.persistence.TrainedModelDefinitionDoc;
3938
import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase;
4039

41-
import java.time.Duration;
42-
import java.time.temporal.ChronoUnit;
4340
import java.util.List;
4441
import java.util.Set;
4542

@@ -59,7 +56,6 @@
5956
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
6057
public class JobsAndModelsIT extends BaseMlIntegTestCase {
6158

62-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/103588")
6359
public void testCluster_GivenAnomalyDetectionJobAndTrainedModelDeployment_ShouldNotAllocateBothOnSameNode() throws Exception {
6460
// This test starts 2 ML nodes and then starts an anomaly detection job and a
6561
// trained model deployment that do not both fit in one node. We then proceed
@@ -237,8 +233,6 @@ public void testCluster_GivenAnomalyDetectionJobAndTrainedModelDeployment_Should
237233
assertThat(jobStats.getNode(), is(not(equalTo(modelStats.getDeploymentStats().getNodeStats().get(0).getNode()))));
238234
});
239235

240-
assertRecentLastTaskStateChangeTime(MlTasks.jobTaskId(jobId), Duration.of(10, ChronoUnit.SECONDS), null);
241-
242236
// Clean up
243237
client().execute(CloseJobAction.INSTANCE, new CloseJobAction.Request(jobId).setForce(true)).actionGet();
244238
client().execute(StopTrainedModelDeploymentAction.INSTANCE, new StopTrainedModelDeploymentAction.Request(model.getModelId()))

0 commit comments

Comments
 (0)