From 0d4d143317d7ad71ab2a37ad0c93e076e83bf4d1 Mon Sep 17 00:00:00 2001 From: PSeitz Date: Tue, 27 Aug 2024 11:48:03 +0200 Subject: [PATCH] use random splits for sort tests (#5303) --- .../sort_orders/0001-sort-elasticapi.yaml | 22 +++++++++---------- .../scenarii/sort_orders/_setup.quickwit.yaml | 11 +++------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/quickwit/rest-api-tests/scenarii/sort_orders/0001-sort-elasticapi.yaml b/quickwit/rest-api-tests/scenarii/sort_orders/0001-sort-elasticapi.yaml index cdf7de1297c..0c44e8f39a0 100644 --- a/quickwit/rest-api-tests/scenarii/sort_orders/0001-sort-elasticapi.yaml +++ b/quickwit/rest-api-tests/scenarii/sort_orders/0001-sort-elasticapi.yaml @@ -4,39 +4,39 @@ engines: endpoint: _elastic/sortorder/_search json: query: - match_all: {} + bool: + must_not: + match: + count: 10 sort: - count: {"order" : "desc"} expected: hits: total: - value: 7 + value: 4 relation: "eq" hits: - _source: { "count": 15, "id": 2 } - - _source: { "count": 10, "id": 0 } - - _source: { "count": 10, "id": 2 } - - _source: { "count": 10, "id": 1 } - - _source: {"count": -2.5, "id": 4} + - _source: { "count": -2.5, "id": 4 } - _source: { "id": 5 } - _source: { "id": 3 } --- endpoint: _elastic/sortorder/_search json: query: - match_all: {} + bool: + must_not: + match: + count: 10 sort: - count: {"order" : "asc"} expected: hits: total: - value: 7 + value: 4 relation: "eq" hits: - _source: {"count": -2.5, "id": 4} - - _source: {"count": 10, "id": 1 } - - _source: {"count": 10, "id": 2 } - - _source: {"count": 10, "id": 0 } - _source: {"count": 15, "id": 2 } - _source: {"id": 3} - _source: {"id": 5} diff --git a/quickwit/rest-api-tests/scenarii/sort_orders/_setup.quickwit.yaml b/quickwit/rest-api-tests/scenarii/sort_orders/_setup.quickwit.yaml index 8ba6415c01c..f6ebfdc505e 100644 --- a/quickwit/rest-api-tests/scenarii/sort_orders/_setup.quickwit.yaml +++ b/quickwit/rest-api-tests/scenarii/sort_orders/_setup.quickwit.yaml @@ -20,18 +20,13 @@ method: POST endpoint: sortorder/ingest params: commit: force -ndjson: +min_splits: 1 +max_splits: 10 +shuffle_ndjson: - {"count": 10, "id": 1} - {"count": 10, "id": 2} - {"count": 15, "id": 2} - {"id": 3} ---- -# Ingest documents split #2 -method: POST -endpoint: sortorder/ingest -params: - commit: force -ndjson: - {"count": 10, "id": 0} - {"count": -2.5, "id": 4} - {"id": 5}