Skip to content

Commit 70b3bb5

Browse files
authored
[8.x] Backport 120040 + unmute tests (#120061)
* Clean up lingering tasks after DatafeedJobsIT. (#120040) * unmute tests
1 parent 02835dc commit 70b3bb5

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

muted-tests.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,6 @@ tests:
407407
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
408408
method: test {p0=synonyms/90_synonyms_reloading_for_synset/Reload analyzers for specific synonym set}
409409
issue: https://github.com/elastic/elasticsearch/issues/116777
410-
- class: org.elasticsearch.xpack.ml.integration.InferenceIngestInputConfigIT
411-
method: testIngestWithInputFields
412-
issue: https://github.com/elastic/elasticsearch/issues/118092
413-
- class: org.elasticsearch.xpack.ml.integration.InferenceIngestInputConfigIT
414-
method: testIngestWithMultipleInputFields
415-
issue: https://github.com/elastic/elasticsearch/issues/118093
416410
- class: org.elasticsearch.search.fieldcaps.FieldCapabilitiesIT
417411
method: testRelocation
418412
issue: https://github.com/elastic/elasticsearch/issues/119280
@@ -439,18 +433,6 @@ tests:
439433
- class: org.elasticsearch.search.profile.dfs.DfsProfilerIT
440434
method: testProfileDfs
441435
issue: https://github.com/elastic/elasticsearch/issues/119711
442-
- class: org.elasticsearch.xpack.ml.integration.MlJobIT
443-
method: testCreateJobInCustomSharedIndexUpdatesMapping
444-
issue: https://github.com/elastic/elasticsearch/issues/119660
445-
- class: org.elasticsearch.xpack.ml.integration.MlJobIT
446-
method: testUsage
447-
issue: https://github.com/elastic/elasticsearch/issues/119659
448-
- class: org.elasticsearch.xpack.ml.integration.MlJobIT
449-
method: testOpenJob_GivenTimeout_Returns408
450-
issue: https://github.com/elastic/elasticsearch/issues/119810
451-
- class: org.elasticsearch.xpack.ml.integration.MlJobIT
452-
method: testGetJob_GivenJobExists
453-
issue: https://github.com/elastic/elasticsearch/issues/119811
454436
- class: org.elasticsearch.xpack.security.authc.ldap.ADLdapUserSearchSessionFactoryTests
455437
issue: https://github.com/elastic/elasticsearch/issues/119882
456438
- class: org.elasticsearch.index.mapper.AbstractShapeGeometryFieldMapperTests

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import org.elasticsearch.ElasticsearchException;
1212
import org.elasticsearch.ElasticsearchStatusException;
1313
import org.elasticsearch.ResourceNotFoundException;
14+
import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest;
15+
import org.elasticsearch.action.admin.cluster.node.tasks.cancel.TransportCancelTasksAction;
1416
import org.elasticsearch.action.search.SearchRequest;
1517
import org.elasticsearch.action.support.master.AcknowledgedResponse;
1618
import org.elasticsearch.common.ReferenceDocs;
@@ -80,6 +82,10 @@ public class DatafeedJobsIT extends MlNativeAutodetectIntegTestCase {
8082
public void cleanup() {
8183
updateClusterSettings(Settings.builder().putNull("logger.org.elasticsearch.xpack.ml.datafeed"));
8284
cleanUp();
85+
// Race conditions between closing and killing tasks in these tests,
86+
// sometimes result in lingering persistent tasks (such as "_close"),
87+
// which cause subsequent tests to fail.
88+
client().execute(TransportCancelTasksAction.TYPE, new CancelTasksRequest());
8389
}
8490

8591
public void testLookbackOnly() throws Exception {

0 commit comments

Comments
 (0)