Skip to content

Commit

Permalink
[ML] Fix AutodetectMemoryLimitIT.testManyDistinctOverFields (#105727)
Browse files Browse the repository at this point in the history
It seems that the changes of elastic/ml-cpp#2585
combined with the randomness of the test could cause it to fail
very occasionally, and by a tiny percentage over the expected
upper bound. This change reenables the test by very slightly
increasing the upper bound.

Fixes #105347
  • Loading branch information
droberts195 authored Feb 22, 2024
1 parent a9783c4 commit 268ba12
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ public void testTooManyByAndOverFields() throws Exception {
assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT));
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/105347")
public void testManyDistinctOverFields() throws Exception {
Detector.Builder detector = new Detector.Builder("sum", "value");
detector.setOverFieldName("user");
Expand Down Expand Up @@ -226,7 +225,7 @@ public void testManyDistinctOverFields() throws Exception {
// Assert we haven't violated the limit too much
GetJobsStatsAction.Response.JobStats jobStats = getJobStats(job.getId()).get(0);
ModelSizeStats modelSizeStats = jobStats.getModelSizeStats();
assertThat(modelSizeStats.getModelBytes(), lessThan(120000000L));
assertThat(modelSizeStats.getModelBytes(), lessThan(120500000L));
assertThat(modelSizeStats.getModelBytes(), greaterThan(90000000L));
assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT));
}
Expand Down

0 comments on commit 268ba12

Please sign in to comment.