Skip to content

Commit 5c8c76e

Browse files
Fix bit vector tests (#110521)
Bit vector tests were failing in cases where an index has more than 1 shards. For error cases when we expected a failure of the whole request, shards with empty documents returned success and the whoel request unexpectedly returned 200. Ensuring that index contains only 1 shard fixes these failures. Closes #110290, #110291
1 parent 1aea049 commit 5c8c76e

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/146_dense_vector_bit_basic.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ setup:
88
indices.create:
99
index: test-index
1010
body:
11+
settings:
12+
number_of_shards: 1
1113
mappings:
1214
properties:
1315
vector:
@@ -107,7 +109,6 @@ setup:
107109
headers:
108110
Content-Type: application/json
109111
search:
110-
rest_total_hits_as_int: true
111112
body:
112113
query:
113114
script_score:
@@ -138,7 +139,6 @@ setup:
138139
headers:
139140
Content-Type: application/json
140141
search:
141-
rest_total_hits_as_int: true
142142
body:
143143
query:
144144
script_score:
@@ -152,7 +152,6 @@ setup:
152152
headers:
153153
Content-Type: application/json
154154
search:
155-
rest_total_hits_as_int: true
156155
body:
157156
query:
158157
script_score:
@@ -167,7 +166,6 @@ setup:
167166
headers:
168167
Content-Type: application/json
169168
search:
170-
rest_total_hits_as_int: true
171169
body:
172170
query:
173171
script_score:

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ tests:
7676
- class: org.elasticsearch.compute.lucene.ValueSourceReaderTypeConversionTests
7777
method: testLoadAll
7878
issue: https://github.com/elastic/elasticsearch/issues/110244
79-
- class: org.elasticsearch.painless.LangPainlessClientYamlTestSuiteIT
80-
method: test {yaml=painless/146_dense_vector_bit_basic/Cosine Similarity is not supported}
81-
issue: https://github.com/elastic/elasticsearch/issues/110290
82-
- class: org.elasticsearch.painless.LangPainlessClientYamlTestSuiteIT
83-
method: test {yaml=painless/146_dense_vector_bit_basic/Dot Product is not supported}
84-
issue: https://github.com/elastic/elasticsearch/issues/110291
8579
- class: org.elasticsearch.action.search.SearchProgressActionListenerIT
8680
method: testSearchProgressWithQuery
8781
issue: https://github.com/elastic/elasticsearch/issues/109867

0 commit comments

Comments
 (0)