Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.sameInstance;

public class AppendProcessorTests extends ESTestCase {
Expand Down Expand Up @@ -84,7 +85,7 @@ public void testAppendValuesToNonExistingList() throws Exception {
values.add(value);
appendProcessor = createAppendProcessor(field, value, null, true, false);
} else {
int valuesSize = randomIntBetween(0, 10);
int valuesSize = randomIntBetween(1, 10);
for (int i = 0; i < valuesSize; i++) {
values.add(scalar.randomValue());
}
Expand All @@ -108,7 +109,7 @@ public void testConvertScalarToList() throws Exception {
values.add(value);
appendProcessor = createAppendProcessor(field, value, null, true, false);
} else {
int valuesSize = randomIntBetween(0, 10);
int valuesSize = randomIntBetween(1, 10);
for (int i = 0; i < valuesSize; i++) {
values.add(scalar.randomValue());
}
Expand Down Expand Up @@ -295,9 +296,13 @@ public void testAppendingToNonExistingListEmptyStringAndEmptyValuesDisallowed()
appendProcessor = createAppendProcessor(field, allValues, null, true, true);
}
appendProcessor.execute(ingestDocument);
List<?> list = ingestDocument.getFieldValue(field, List.class);
List<?> list = ingestDocument.getFieldValue(field, List.class, true);
assertThat(list, not(sameInstance(values)));
assertThat(list, equalTo(values));
if (values.isEmpty()) {
assertThat(list, nullValue());
} else {
assertThat(list, equalTo(values));
}
}

public void testCopyFromOtherFieldSimple() throws Exception {
Expand Down
9 changes: 0 additions & 9 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,6 @@ tests:
- class: org.elasticsearch.xpack.core.HealthApiFeatureSetUsageTests
method: testEqualsAndHashcode
issue: https://github.com/elastic/elasticsearch/issues/136648
- class: org.elasticsearch.ingest.common.AppendProcessorTests
method: testAppendingToNonExistingListEmptyStringAndEmptyValuesDisallowed
issue: https://github.com/elastic/elasticsearch/issues/136657
- class: org.elasticsearch.ingest.common.AppendProcessorTests
method: testAppendValuesToNonExistingList
issue: https://github.com/elastic/elasticsearch/issues/136662
- class: org.elasticsearch.ingest.common.AppendProcessorTests
method: testConvertScalarToList
issue: https://github.com/elastic/elasticsearch/issues/136667
- class: org.elasticsearch.xpack.downsample.ILMDownsampleDisruptionIT
method: testILMDownsampleRollingRestart
issue: https://github.com/elastic/elasticsearch/issues/136585
Expand Down