Skip to content

Commit 856ff0d

Browse files
committed
fix tests
1 parent 57b2cd6 commit 856ff0d

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/action/EsqlQueryResponseTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,24 +560,24 @@ public void testChunkResponseSizeColumnar() {
560560
try (EsqlQueryResponse resp = randomResponse(true, null)) {
561561
int columnCount = resp.pages().get(0).getBlockCount();
562562
int bodySize = resp.pages().stream().mapToInt(p -> p.getPositionCount() * p.getBlockCount()).sum() + columnCount * 2;
563-
assertChunkCount(resp, r -> 5 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize);
563+
assertChunkCount(resp, r -> 6 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize);
564564
}
565565

566566
try (EsqlQueryResponse resp = randomResponseAsync(true, null, true)) {
567567
int columnCount = resp.pages().get(0).getBlockCount();
568568
int bodySize = resp.pages().stream().mapToInt(p -> p.getPositionCount() * p.getBlockCount()).sum() + columnCount * 2;
569-
assertChunkCount(resp, r -> 6 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize); // is_running
569+
assertChunkCount(resp, r -> 8 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize); // is_running
570570
}
571571
}
572572

573573
public void testChunkResponseSizeRows() {
574574
try (EsqlQueryResponse resp = randomResponse(false, null)) {
575575
int bodySize = resp.pages().stream().mapToInt(Page::getPositionCount).sum();
576-
assertChunkCount(resp, r -> 5 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize);
576+
assertChunkCount(resp, r -> 6 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize);
577577
}
578578
try (EsqlQueryResponse resp = randomResponseAsync(false, null, true)) {
579579
int bodySize = resp.pages().stream().mapToInt(Page::getPositionCount).sum();
580-
assertChunkCount(resp, r -> 6 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize);
580+
assertChunkCount(resp, r -> 8 + clusterDetailsSize(resp.getExecutionInfo().clusterInfo.size()) + bodySize);
581581
}
582582
}
583583

x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,16 +1064,10 @@ public void testDisableFieldNameField() throws IOException {
10641064
// {"columns":[{"name":"dv","type":"keyword"},{"name":"no_dv","type":"keyword"}],"values":[["test",null]]}
10651065
try {
10661066
Map<String, Object> result = entityAsMap(client().performRequest(esql));
1067-
MapMatcher mapMatcher = matchesMap();
1068-
if (result.get("took") != null) {
1069-
mapMatcher = mapMatcher.entry("took", ((Integer) result.get("took")).intValue());
1070-
}
1071-
assertMap(
1067+
assertResultMap(
10721068
result,
1073-
mapMatcher.entry(
1074-
"columns",
1075-
List.of(Map.of("name", "dv", "type", "keyword"), Map.of("name", "no_dv", "type", "keyword"))
1076-
).entry("values", List.of(List.of("test", "test")))
1069+
List.of(Map.of("name", "dv", "type", "keyword"), Map.of("name", "no_dv", "type", "keyword")),
1070+
List.of(List.of("test", "test"))
10771071
);
10781072
} catch (ResponseException e) {
10791073
logger.error(

0 commit comments

Comments
 (0)