[7.10][ML] Increase timeout waiting for DFA jobs to finish in integ tests (#65126) (#65131)

It appears that occasionally 30 seconds are not enough for CI workers
to complete DFA jobs. In order to eliminate such failures we increase
the time we wait for DFA jobs to complete in integration tests to
60 seconds.

Fixes #64926

Backport of #65126
This commit is contained in:
Dimitris Athanasiou 2020-11-17 16:46:17 +02:00 committed by GitHub
parent 93505cc05f
commit 197de8fe66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 13 deletions

View File

@ -129,7 +129,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
return new NamedXContentRegistry(entries);
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/64926")
public void testSingleNumericFeatureAndMixedTrainingAndNonTrainingRows() throws Exception {
initialize("classification_single_numeric_feature_and_mixed_data_set");
String predictedClassField = KEYWORD_FIELD + "_prediction";
@ -242,7 +241,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
assertEvaluation(KEYWORD_FIELD, KEYWORD_FIELD_VALUES, "ml." + predictedClassField);
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/64926")
public void testWithOnlyTrainingRowsAndTrainingPercentIsHundred() throws Exception {
initialize("classification_only_training_data_and_training_percent_is_100");
String predictedClassField = KEYWORD_FIELD + "_prediction";
@ -524,7 +522,7 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
}
}
waitUntilAnalyticsIsStopped(jobId, TimeValue.timeValueMinutes(1));
waitUntilAnalyticsIsStopped(jobId);
SearchResponse sourceData = client().prepareSearch(sourceIndex).setTrackTotalHits(true).setSize(1000).get();
for (SearchHit hit : sourceData.getHits()) {
@ -566,7 +564,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
assertThat(e.getMessage(), equalTo("Field [keyword-field] must have at most [30] distinct values but there were at least [31]"));
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/64926")
public void testDependentVariableCardinalityTooHighButWithQueryMakesItWithinRange() throws Exception {
initialize("cardinality_too_high_with_query");
indexData(sourceIndex, 6, 5, KEYWORD_FIELD);
@ -623,7 +620,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
assertEvaluation(ALIAS_TO_KEYWORD_FIELD, KEYWORD_FIELD_VALUES, "ml." + predictedClassField);
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/64926")
public void testDependentVariableIsAliasToNested() throws Exception {
initialize("dependent_variable_is_alias_to_nested");
String predictedClassField = ALIAS_TO_NESTED_FIELD + "_prediction";
@ -642,7 +638,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
assertEvaluation(ALIAS_TO_NESTED_FIELD, KEYWORD_FIELD_VALUES, "ml." + predictedClassField);
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/64926")
public void testTwoJobsWithSameRandomizeSeedUseSameTrainingSet() throws Exception {
String sourceIndex = "classification_two_jobs_with_same_randomize_seed_source";
String dependentVariable = KEYWORD_FIELD;
@ -687,7 +682,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
assertThat(secondRunTrainingRowsIds, equalTo(firstRunTrainingRowsIds));
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/64926")
public void testSetUpgradeMode_ExistingTaskGetsUnassigned() throws Exception {
initialize("classification_set_upgrade_mode");
indexData(sourceIndex, 300, 0, KEYWORD_FIELD);
@ -785,7 +779,6 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
assertThat(stateIndexSearchResponse.getHits().getTotalHits().value, equalTo(0L));
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/64926")
public void testUpdateAnalytics() throws Exception {
initialize("update_analytics_description");

View File

@ -149,7 +149,7 @@ abstract class MlNativeDataFrameAnalyticsIntegTestCase extends MlNativeIntegTest
}
protected void waitUntilAnalyticsIsStopped(String id) throws Exception {
waitUntilAnalyticsIsStopped(id, TimeValue.timeValueSeconds(30));
waitUntilAnalyticsIsStopped(id, TimeValue.timeValueSeconds(60));
}
protected void waitUntilAnalyticsIsStopped(String id, TimeValue waitTime) throws Exception {

View File

@ -15,9 +15,8 @@ import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchModule;
@ -40,7 +39,6 @@ import org.junit.After;
import java.io.IOException;
import java.time.Instant;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -306,7 +304,7 @@ public class RegressionIT extends MlNativeDataFrameAnalyticsIntegTestCase {
}
}
waitUntilAnalyticsIsStopped(jobId, TimeValue.timeValueMinutes(1));
waitUntilAnalyticsIsStopped(jobId);
SearchResponse sourceData = client().prepareSearch(sourceIndex).setTrackTotalHits(true).setSize(1000).get();
for (SearchHit hit : sourceData.getHits()) {