mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -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
|
- class: org.elasticsearch.reservedstate.service.ReservedClusterStateServiceTests
|
||||||
method: testProcessMultipleChunks
|
method: testProcessMultipleChunks
|
||||||
issue: https://github.com/elastic/elasticsearch/issues/125305
|
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:
|
# Examples:
|
||||||
#
|
#
|
||||||
|
|
|
@ -83,10 +83,10 @@ public abstract class NativeArrayIntegrationTestCase extends ESSingleNodeTestCas
|
||||||
var expectedDocument = jsonBuilder().startObject();
|
var expectedDocument = jsonBuilder().startObject();
|
||||||
var inputDocument = jsonBuilder().startObject();
|
var inputDocument = jsonBuilder().startObject();
|
||||||
|
|
||||||
boolean expectedContainsArray = values.length > 0 || malformed.length > 1;
|
boolean expectedIsArray = values.length != 0 || malformed.length != 1;
|
||||||
if (expectedContainsArray) {
|
if (expectedIsArray) {
|
||||||
expectedDocument.startArray("field");
|
expectedDocument.startArray("field");
|
||||||
} else if (malformed.length > 0) {
|
} else {
|
||||||
expectedDocument.field("field");
|
expectedDocument.field("field");
|
||||||
}
|
}
|
||||||
inputDocument.startArray("field");
|
inputDocument.startArray("field");
|
||||||
|
@ -113,7 +113,7 @@ public abstract class NativeArrayIntegrationTestCase extends ESSingleNodeTestCas
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expectedContainsArray) {
|
if (expectedIsArray) {
|
||||||
expectedDocument.endArray();
|
expectedDocument.endArray();
|
||||||
}
|
}
|
||||||
expectedDocument.endObject();
|
expectedDocument.endObject();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue