[BUG] Fix a flaky test in KNN990CodecTests::testBuildFromModelTemplate
. It is failing to get a mocking value.
#2257
Labels
bug
Something isn't working
What is the bug?
KNN990CodecTests::testBuildFromModelTemplate
does a static mocking to return a mockedOpenSearchKNNModelDao
where it suppose to return a predefined valueModelMetadata
, but the actual value returned is either null or its state does not equal toModelState.CREATED
.However, it keeps getting false from
isModelCreated(modelMetadata)
.How can one reproduce the bug?
It's tricky to reproduce it, sometimes when we're lucky we can see the failure, but mostly it will pass. Very subtle.
What is the expected behavior?
We should be able to get
modelMetadata1
whenmodelDao.getMetadata("test-model")
was called.But somehow an invalid value is being return. There are two possible cases.
null
: false will be returned as a result of evaluation ofmodelMetadata != null
ModelState.CREATED
. False ==return modelMetadata.getState().equals(ModelState.CREATED)
.What is your host/environment?
Do you have any screenshots?
Error logs:
Do you have any additional context?
N/A
The text was updated successfully, but these errors were encountered: