test__get_vector_similarity_query_support_true
and test__get_vector_similarity_query_support_false
for OpenSearchDocumentStore
are flaky
#3082
Labels
Describe the bug
In this test run on the main branch, the tests
test__get_vector_similarity_query_support_true
andtest__get_vector_similarity_query_support_false
failed due to anAssertionError
. This error didn't occur before.Error message
Additional context
This error most likely is due to the fact that we create a random numpy array here using
np.ndarray
. As stated in the numpy documentation, this array might containnan
values. And as stated in this section of the numpy documentation, comparing twonan
values for equality will always haveFalse
as a result.We should make sure that the randomly initialized numpy array does not contain any
nan
values, for example by usingnp.random.random_sample
.The text was updated successfully, but these errors were encountered: