Skip to content

Commit 3f210e2

Browse files
committed
[ML] Load data streams plugin for ML internal cluster tests (#63560)
Now that deprecation logs get indexed to a data stream, if we do not load the data stream plugin in our tests and any test generates a deprecation log message then millions of exceptions get logged, slowing down the tests to the extent that they can fail. This change loads the data streams plugin during the ML internal cluster tests. (It should already be present in external cluster tests.) Fixes #63548
1 parent 5fe51b1 commit 3f210e2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

x-pack/plugin/ml/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ dependencies {
5050
compileOnly project(path: xpackModule('core'), configuration: 'default')
5151
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
5252
testImplementation project(path: xpackModule('ilm'), configuration: 'default')
53+
testImplementation project(path: xpackModule('data-streams'), configuration: 'default')
5354
// This should not be here
5455
testImplementation project(path: xpackModule('security'), configuration: 'testArtifacts')
5556

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import org.elasticsearch.xpack.core.ml.job.config.Job;
5959
import org.elasticsearch.xpack.core.ml.job.config.JobState;
6060
import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts;
61+
import org.elasticsearch.xpack.datastreams.DataStreamsPlugin;
6162
import org.elasticsearch.xpack.ilm.IndexLifecycle;
6263
import org.elasticsearch.xpack.ml.LocalStateMachineLearning;
6364
import org.elasticsearch.xpack.ml.MachineLearning;
@@ -124,7 +125,9 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
124125
CommonAnalysisPlugin.class,
125126
ReindexPlugin.class,
126127
// ILM is required for .ml-state template index settings
127-
IndexLifecycle.class);
128+
IndexLifecycle.class,
129+
// Deprecation warnings go to a data stream, if we ever cause a deprecation warning the data streams plugin is required
130+
DataStreamsPlugin.class);
128131
}
129132

130133
@Override

0 commit comments

Comments
 (0)