Skip to content

Commit

Permalink
Adjusted testChunkResponseSizeColumnar to always expected the overall…
Browse files Browse the repository at this point in the history
… took time in the async response (#117673)
  • Loading branch information
quux00 authored Nov 28, 2024
1 parent 77626d6 commit bb93f1f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,15 +519,14 @@ static EsqlQueryResponse fromXContent(XContentParser parser) {
}

public void testChunkResponseSizeColumnar() {
int sizeClusterDetails = 14;
try (EsqlQueryResponse resp = randomResponse(true, null)) {
int sizeClusterDetails = 14;
int columnCount = resp.pages().get(0).getBlockCount();
int bodySize = resp.pages().stream().mapToInt(p -> p.getPositionCount() * p.getBlockCount()).sum() + columnCount * 2;
assertChunkCount(resp, r -> 5 + sizeClusterDetails + bodySize);
}

try (EsqlQueryResponse resp = randomResponseAsync(true, null, true)) {
int sizeClusterDetails = resp.isRunning() ? 13 : 14; // overall took time not present when is_running=true
int columnCount = resp.pages().get(0).getBlockCount();
int bodySize = resp.pages().stream().mapToInt(p -> p.getPositionCount() * p.getBlockCount()).sum() + columnCount * 2;
assertChunkCount(resp, r -> 7 + sizeClusterDetails + bodySize); // is_running
Expand Down

0 comments on commit bb93f1f

Please sign in to comment.