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
9 changes: 0 additions & 9 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ tests:
- class: org.elasticsearch.xpack.inference.integration.AuthorizationTaskExecutorIT
method: testCreatesChatCompletion_AndThenCreatesTextEmbedding
issue: https://github.com/elastic/elasticsearch/issues/138012
- class: org.elasticsearch.xpack.unsignedlong.UnsignedLongSyntheticSourceNativeArrayIntegrationTests
method: testSynthesizeArrayRandom
issue: https://github.com/elastic/elasticsearch/issues/139376
- class: org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests
method: testReductionPlanForTopNWithPushedDownFunctionsInOrder
issue: https://github.com/elastic/elasticsearch/issues/139490
Expand All @@ -427,9 +424,6 @@ tests:
- class: org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStoreRepositoryTests
method: testMultipleSnapshotAndRollback
issue: https://github.com/elastic/elasticsearch/issues/139556
- class: org.elasticsearch.index.mapper.LongSyntheticSourceNativeArrayIntegrationTests
method: testSynthesizeArrayRandom
issue: https://github.com/elastic/elasticsearch/issues/139562
- class: org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStoreRepositoryTests
method: testDeleteBlobs
issue: https://github.com/elastic/elasticsearch/issues/139646
Expand All @@ -439,9 +433,6 @@ tests:
- class: org.elasticsearch.xpack.core.action.XPackUsageResponseTests
method: testVersionDependentSerializationWriteToOldStream
issue: https://github.com/elastic/elasticsearch/issues/139576
- class: org.elasticsearch.index.mapper.HalfFloatSyntheticSourceNativeArrayIntegrationTests
method: testSynthesizeArrayRandom
issue: https://github.com/elastic/elasticsearch/issues/139658
- class: org.elasticsearch.smoketest.WatcherYamlRestIT
method: test {p0=mustache/10_webhook/Test webhook action with mustache integration}
issue: https://github.com/elastic/elasticsearch/issues/139663
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public void testSynthesizeArrayIgnoreAbove() throws Exception {
new Object[] { "1", "2", "3", "blabla" } };

// values in the original array should be deduplicated
var expectedArrayValues = new Object[][] {
var expectedArrayValues = new Object[] {
new Object[] { null, "a", "ab", "abc", "abcd", null, "abcde" },
new Object[] { "12345" },
"12345",
new Object[] { "123", "1234", "12345" },
new Object[] { null, null, null, "blabla" },
new Object[] { "1", "2", "3", "blabla" } };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,20 +257,10 @@ protected void verifySyntheticArray(Object[][] arrays, XContentBuilder mapping,
verifySyntheticArray(arrays, arrays, mapping, expectedStoredFields);
}

private XContentBuilder arrayToSource(Object[] array) throws IOException {
private XContentBuilder arrayToSource(Object obj) throws IOException {
var source = jsonBuilder().startObject();
if (array != null) {
// collapse array if it only consists of one element
// if the only element is null, then we'll skip synthesizing source for that field
if (array.length == 1 && array[0] != null) {
source.field("field", array[0]);
} else {
source.startArray("field");
for (Object arrayValue : array) {
source.value(arrayValue);
}
source.endArray();
}
if (obj != null) {
source.field("field", obj);
} else {
source.field("field").nullValue();
}
Expand All @@ -279,7 +269,7 @@ private XContentBuilder arrayToSource(Object[] array) throws IOException {

protected void verifySyntheticArray(
Object[][] inputArrays,
Object[][] expectedArrays,
Object[] expectedArrays,
XContentBuilder mapping,
String... expectedStoredFields
) throws IOException {
Expand Down