mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
Fix ignores malformed testcase (#125337)
Fix and unmute testSynthesizeArrayRandomIgnoresMalformed
This commit is contained in:
parent
e9c4b267c2
commit
2ff03acf51
2 changed files with 4 additions and 7 deletions
|
@ -393,9 +393,6 @@ tests:
|
|||
- class: org.elasticsearch.reservedstate.service.ReservedClusterStateServiceTests
|
||||
method: testProcessMultipleChunks
|
||||
issue: https://github.com/elastic/elasticsearch/issues/125305
|
||||
- class: org.elasticsearch.index.mapper.NativeArrayIntegrationTestCase
|
||||
method: testSynthesizeArrayRandomIgnoresMalformed
|
||||
issue: https://github.com/elastic/elasticsearch/issues/125319
|
||||
|
||||
# Examples:
|
||||
#
|
||||
|
|
|
@ -83,10 +83,10 @@ public abstract class NativeArrayIntegrationTestCase extends ESSingleNodeTestCas
|
|||
var expectedDocument = jsonBuilder().startObject();
|
||||
var inputDocument = jsonBuilder().startObject();
|
||||
|
||||
boolean expectedContainsArray = values.length > 0 || malformed.length > 1;
|
||||
if (expectedContainsArray) {
|
||||
boolean expectedIsArray = values.length != 0 || malformed.length != 1;
|
||||
if (expectedIsArray) {
|
||||
expectedDocument.startArray("field");
|
||||
} else if (malformed.length > 0) {
|
||||
} else {
|
||||
expectedDocument.field("field");
|
||||
}
|
||||
inputDocument.startArray("field");
|
||||
|
@ -113,7 +113,7 @@ public abstract class NativeArrayIntegrationTestCase extends ESSingleNodeTestCas
|
|||
}
|
||||
}
|
||||
|
||||
if (expectedContainsArray) {
|
||||
if (expectedIsArray) {
|
||||
expectedDocument.endArray();
|
||||
}
|
||||
expectedDocument.endObject();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue