Skip to content

Commit

Permalink
[ML] Fix AutodetectMemoryLimitIT.testManyDistinctOverFields (elastic#…
Browse files Browse the repository at this point in the history
…105727)

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 elastic#105347
  • Loading branch information
droberts195 committed Feb 22, 2024
1 parent bcaed12 commit 1d93db3
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 1d93db3

Please sign in to comment.