Skip to content

Commit 9c466e4

Browse files
committed
Try to fix BWC test (2)
1 parent ea8567b commit 9c466e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/CsvTestsDataLoader.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,10 @@ private static boolean isLookupDataset(TestDataset dataset) throws IOException {
316316
}
317317

318318
private static boolean isUnmappedFieldsDataset(TestDataset dataset) throws IOException {
319-
String mappingJsonText = readTextFile(getResource(dataset.mappingFileName()));
319+
if (dataset.mappingFileName() == null) {
320+
return true;
321+
}
322+
String mappingJsonText = readTextFile(getResource("/" + dataset.mappingFileName()));
320323
JsonNode mappingNode = new ObjectMapper().readTree(mappingJsonText);
321324
// BWC tests don't support _source field directives, so don't load those datasets.
322325
return mappingNode.get("_source") != null;

0 commit comments

Comments
 (0)