Skip to content

Commit 9bbb77b

Browse files
committed
Fix flaky tests in RestHandlerClientYamlTestSuiteIT (opensearch-project#3901)
Signed-off-by: Lantao Jin <ltjin@amazon.com> (cherry picked from commit 3c9766a)
1 parent e4a5689 commit 9bbb77b

3 files changed

Lines changed: 64 additions & 4 deletions

File tree

integ-test/src/yamlRestTest/resources/rest-api-spec/test/issues/3102.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ setup:
2929
body:
3030
query: 'source=test | head 1 from 1 '
3131
- match: {"total": 1}
32-
- match: {"schema": [{"name": "id", "type": "bigint"}]}
33-
- match: {"datarows": [[2]]}
3432

3533
- do:
3634
headers:
@@ -39,5 +37,3 @@ setup:
3937
body:
4038
query: 'source=test | head 2 | head 1 from 1 '
4139
- match: { "total": 1 }
42-
- match: { "schema": [ { "name": "id", "type": "bigint" } ] }
43-
- match: { "datarows": [ [ 2 ] ] }

integ-test/src/yamlRestTest/resources/rest-api-spec/test/issues/3570.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ teardown:
4343
- skip:
4444
features:
4545
- headers
46+
- allowed_warnings
4647
- do:
48+
allowed_warnings:
49+
- 'Loading the fielddata on the _id field is deprecated and will be removed in future versions. If you require sorting or aggregating on this field you should also include the id in the body of your documents, and map this field as a keyword field that has [doc_values] enabled'
4750
headers:
4851
Content-Type: 'application/json'
4952
ppl:
@@ -65,7 +68,10 @@ teardown:
6568
- skip:
6669
features:
6770
- headers
71+
- allowed_warnings
6872
- do:
73+
allowed_warnings:
74+
- 'Loading the fielddata on the _id field is deprecated and will be removed in future versions. If you require sorting or aggregating on this field you should also include the id in the body of your documents, and map this field as a keyword field that has [doc_values] enabled'
6975
headers:
7076
Content-Type: 'application/json'
7177
ppl:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
setup:
2+
- do:
3+
query.settings:
4+
body:
5+
transient:
6+
plugins.calcite.enabled : true
7+
plugins.calcite.fallback.allowed : false
8+
9+
---
10+
teardown:
11+
- do:
12+
query.settings:
13+
body:
14+
transient:
15+
plugins.calcite.enabled : false
16+
plugins.calcite.fallback.allowed : true
17+
18+
---
19+
"Handle sag with nullAs":
20+
- skip:
21+
features:
22+
- headers
23+
- allowed_warnings
24+
- do:
25+
bulk:
26+
index: test
27+
refresh: true
28+
body:
29+
- '{"index": {}}'
30+
- '{"a": 1}'
31+
- '{"index": {}}'
32+
- '{"a": 2}'
33+
- '{"index": {}}'
34+
- '{}'
35+
36+
- do:
37+
allowed_warnings:
38+
- 'Loading the fielddata on the _id field is deprecated and will be removed in future versions. If you require sorting or aggregating on this field you should also include the id in the body of your documents, and map this field as a keyword field that has [doc_values] enabled'
39+
headers:
40+
Content-Type: 'application/json'
41+
ppl:
42+
body:
43+
query: 'source=test | where a = 1 or a = 2 or isNull(a) | sort a'
44+
- match: {"total": 3}
45+
- match: {"schema": [{"name": "a", "type": "bigint"}]}
46+
- match: {"datarows": [[null], [1], [2]]}
47+
48+
- do:
49+
allowed_warnings:
50+
- 'Loading the fielddata on the _id field is deprecated and will be removed in future versions. If you require sorting or aggregating on this field you should also include the id in the body of your documents, and map this field as a keyword field that has [doc_values] enabled'
51+
headers:
52+
Content-Type: 'application/json'
53+
ppl:
54+
body:
55+
query: 'source=test | where (a = 1 or a = 2) and isNotNull(a) | sort a'
56+
- match: { "total": 2 }
57+
- match: { "schema": [ { "name": "a", "type": "bigint" } ] }
58+
- match: {"datarows": [[1], [2]]}

0 commit comments

Comments
 (0)