Skip to content

Commit d150880

Browse files
authored
[ML][TEST] Fix limits in AutodetectMemoryLimitIT (#42279)
Re-enable muted tests and accommodate recent backend changes that result in higher memory usage being reported for a job at the start of its life-cycle
1 parent 7c503ce commit d150880

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectMemoryLimitIT.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public void testTooManyPartitions() throws Exception {
8484
assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT));
8585
}
8686

87-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/42207")
8887
public void testTooManyByFields() throws Exception {
8988
Detector.Builder detector = new Detector.Builder("count", null);
9089
detector.setByFieldName("user");
@@ -125,12 +124,11 @@ public void testTooManyByFields() throws Exception {
125124
// Assert we haven't violated the limit too much
126125
GetJobsStatsAction.Response.JobStats jobStats = getJobStats(job.getId()).get(0);
127126
ModelSizeStats modelSizeStats = jobStats.getModelSizeStats();
128-
assertThat(modelSizeStats.getModelBytes(), lessThan(31500000L));
127+
assertThat(modelSizeStats.getModelBytes(), lessThan(35000000L));
129128
assertThat(modelSizeStats.getModelBytes(), greaterThan(25000000L));
130129
assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT));
131130
}
132131

133-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/42207")
134132
public void testTooManyByAndOverFields() throws Exception {
135133
Detector.Builder detector = new Detector.Builder("count", null);
136134
detector.setByFieldName("department");
@@ -175,12 +173,11 @@ public void testTooManyByAndOverFields() throws Exception {
175173
// Assert we haven't violated the limit too much
176174
GetJobsStatsAction.Response.JobStats jobStats = getJobStats(job.getId()).get(0);
177175
ModelSizeStats modelSizeStats = jobStats.getModelSizeStats();
178-
assertThat(modelSizeStats.getModelBytes(), lessThan(31500000L));
176+
assertThat(modelSizeStats.getModelBytes(), lessThan(33000000L));
179177
assertThat(modelSizeStats.getModelBytes(), greaterThan(24000000L));
180178
assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT));
181179
}
182180

183-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/42207")
184181
public void testManyDistinctOverFields() throws Exception {
185182
Detector.Builder detector = new Detector.Builder("sum", "value");
186183
detector.setOverFieldName("user");
@@ -226,7 +223,7 @@ public void testManyDistinctOverFields() throws Exception {
226223
// Assert we haven't violated the limit too much
227224
GetJobsStatsAction.Response.JobStats jobStats = getJobStats(job.getId()).get(0);
228225
ModelSizeStats modelSizeStats = jobStats.getModelSizeStats();
229-
assertThat(modelSizeStats.getModelBytes(), lessThan(116000000L));
226+
assertThat(modelSizeStats.getModelBytes(), lessThan(117000000L));
230227
assertThat(modelSizeStats.getModelBytes(), greaterThan(90000000L));
231228
assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT));
232229
}

0 commit comments

Comments
 (0)