Skip to content

Commit 3a5c74f

Browse files
authored
Fixing PipelineFactoryTests.testCreateUnsupportedFieldAccessPattern (elastic#130946)
1 parent 543cf68 commit 3a5c74f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,6 @@ tests:
495495
- class: org.elasticsearch.xpack.esql.inference.bulk.BulkInferenceExecutorTests
496496
method: testSuccessfulExecution
497497
issue: https://github.com/elastic/elasticsearch/issues/130306
498-
- class: org.elasticsearch.ingest.PipelineFactoryTests
499-
method: testCreateUnsupportedFieldAccessPattern
500-
issue: https://github.com/elastic/elasticsearch/issues/130422
501498
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
502499
method: test {p0=msearch/20_typed_keys/Multisearch test with typed_keys parameter for sampler and significant terms}
503500
issue: https://github.com/elastic/elasticsearch/issues/130472

server/src/test/java/org/elasticsearch/ingest/PipelineFactoryTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import static org.hamcrest.Matchers.equalTo;
2525
import static org.hamcrest.Matchers.is;
2626
import static org.hamcrest.Matchers.nullValue;
27+
import static org.junit.Assume.assumeTrue;
2728
import static org.mockito.Mockito.mock;
2829

2930
public class PipelineFactoryTests extends ESTestCase {
@@ -221,12 +222,15 @@ public void testCreateWithPipelineIgnoreFailure() throws Exception {
221222
}
222223

223224
public void testCreateUnsupportedFieldAccessPattern() throws Exception {
225+
assumeTrue("Test is only valid if the logs stream feature flag is enabled", DataStream.LOGS_STREAM_FEATURE_FLAG);
224226
Map<String, Object> processorConfig = new HashMap<>();
225227
processorConfig.put(ConfigurationUtils.TAG_KEY, "test-processor");
226228
Map<String, Object> pipelineConfig = new HashMap<>();
227229
pipelineConfig.put(Pipeline.DESCRIPTION_KEY, "_description");
228230
pipelineConfig.put(Pipeline.VERSION_KEY, versionString);
229-
pipelineConfig.put(Pipeline.FIELD_ACCESS_PATTERN, "random");
231+
if (DataStream.LOGS_STREAM_FEATURE_FLAG) {
232+
pipelineConfig.put(Pipeline.FIELD_ACCESS_PATTERN, "random");
233+
}
230234
if (metadata != null) {
231235
pipelineConfig.put(Pipeline.META_KEY, metadata);
232236
}

0 commit comments

Comments
 (0)