Skip to content

Commit 6a9fe3e

Browse files
committed
fixups
1 parent 523c353 commit 6a9fe3e

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/RandomizedTimeSeriesIT.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,7 @@ public void testRateGroupBySubset() {
360360
| SORT tbucket
361361
| LIMIT 1000
362362
""", DATASTREAM_NAME, dimensionsStr))) {
363-
List<List<Object>> rows = new ArrayList<>();
364-
resp.rows().forEach(rowIter -> {
365-
List<Object> row = new ArrayList<>();
366-
rowIter.forEach(row::add);
367-
rows.add(row);
368-
});
363+
List<List<Object>> rows = consumeRows(resp);
369364
List<String> failedWindows = new ArrayList<>();
370365
var groups = groupedRows(documents, dimensions, SECONDS_IN_WINDOW);
371366
for (List<Object> row : rows) {
@@ -404,12 +399,7 @@ public void testRateGroupByNothing() {
404399
| SORT tbucket
405400
| LIMIT 1000
406401
""", DATASTREAM_NAME))) {
407-
List<List<Object>> rows = new ArrayList<>();
408-
resp.rows().forEach(rowIter -> {
409-
List<Object> row = new ArrayList<>();
410-
rowIter.forEach(row::add);
411-
rows.add(row);
412-
});
402+
List<List<Object>> rows = consumeRows(resp);
413403
List<String> failedWindows = new ArrayList<>();
414404
for (List<Object> row : rows) {
415405
var windowStart = windowStart(row.get(4), SECONDS_IN_WINDOW);

0 commit comments

Comments
 (0)