[7.x][ML] Adjust assertion for job case memory usage estimates (#57929)

Since we change the memory estimates for data frame analytics jobs from worst case to a realistic case, the strict less-than assertion in the test does not hold anymore. I replaced it with a less-or-equal-than assertion.

Backport or #57882
This commit is contained in:
Valeriy Khakhutskyy 2020-06-10 15:17:16 +02:00 committed by GitHub
parent ec60335496
commit c0f368bbf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,6 @@ import org.elasticsearch.xpack.core.ml.utils.QueryProvider;
import java.io.IOException;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
public class ExplainDataFrameAnalyticsIT extends MlNativeDataFrameAnalyticsIntegTestCase {
@ -124,6 +123,7 @@ public class ExplainDataFrameAnalyticsIT extends MlNativeDataFrameAnalyticsInteg
explainResponse = explainDataFrame(config);
assertThat(explainResponse.getMemoryEstimation().getExpectedMemoryWithoutDisk(), lessThan(allDataUsedForTraining));
assertThat(explainResponse.getMemoryEstimation().getExpectedMemoryWithoutDisk(),
lessThanOrEqualTo(allDataUsedForTraining));
}
}