Skip to content

Commit 7085ffa

Browse files
authored
[ML] Fix for flaky sparse_vector_search test (#138740) (#139020)
Tweak params in "sparse_vector_search/Test sparse_vector search with query vector and pruning config" yaml rest test for more deterministic outcome. The test has now been unmuted. Tested with ``` for (( i=0; i<100; ++i )); do echo $i; ./gradlew ":x-pack:plugin:ml:qa:ml-with-security:yamlRestTest" --tests "org.elasticsearch.smoketest.MlWithSecurityIT.test {yaml=ml/sparse_vector_search/Test sparse_vector search with query vector and pruning config}"; if [ $? != 0 ]; then echo "test failed"; break; fi ; done ``` with no failures. Fixes #119548
1 parent db69bff commit 7085ffa

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ tests:
7676
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
7777
method: test {p0=transform/transforms_start_stop/Test start/stop/start transform}
7878
issue: https://github.com/elastic/elasticsearch/issues/119508
79-
- class: org.elasticsearch.smoketest.MlWithSecurityIT
80-
method: test {yaml=ml/sparse_vector_search/Test sparse_vector search with query vector and pruning config}
81-
issue: https://github.com/elastic/elasticsearch/issues/119548
8279
- class: org.elasticsearch.xpack.ml.integration.ForecastIT
8380
method: testOverflowToDisk
8481
issue: https://github.com/elastic/elasticsearch/issues/117740

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/ml/sparse_vector_search.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ teardown:
251251
field: ml.tokens
252252
query_vector:
253253
the: 0.5
254-
comforter: 2.0
254+
comforter: 3.0
255255
smells: 1.0
256256
bad: 1.0
257257
prune: true
@@ -261,7 +261,7 @@ teardown:
261261
only_score_pruned_tokens: false
262262

263263
- match: { hits.total.value: 3 }
264-
- match: { hits.hits.0._score: 4 }
264+
- match: { hits.hits.0._score: 6 }
265265

266266
---
267267
"Test sparse_vector search with query vector and pruning config with only score pruned tokens":

0 commit comments

Comments
 (0)