Add E2E test for MongoDBSearch autoEmbedding support#704
Add E2E test for MongoDBSearch autoEmbedding support#704viveksinghggits merged 7 commits intomasterfrom
Conversation
MCK 1.7.0 Release NotesNew Features
Bug Fixes
|
641b283 to
62f1de8
Compare
| except pymongo.errors.PyMongoError as e: | ||
| logger.debug(f"error: {e}") | ||
|
|
||
| return count > 0, status_msg |
There was a problem hiding this comment.
q: is it reasonable to make this assertion a bit stronger? I.e. is the count deterministic and the output of status_msg?
There was a problem hiding this comment.
Yes, this is reasonable. The response of the returned data might change because of the algorithm that vector search uses, but we can make the document count in response deterministic by passing the number of documents that we want in response. I have done that.
Since the documents that returned in the response might change, I think it won't be a good idea to actually assert the returned data.
| ] | ||
| ) | ||
|
|
||
| def assert_auto_emb_vector_search_query(self, retry_timeout: int = 1): |
There was a problem hiding this comment.
q: shouldn't we make the default timeout a bit higher? I see it is invoked with 60 seconds.
There was a problem hiding this comment.
In most of the places when we wait for index to be ready, we just sleep for 60 seconds, but I have increased this to 90 seconds.
1. Verify the number of returns documents for auto embed vector search query 2. Increase the timeout to get search data to 90 seconds
Summary
This PR adds E2E test for auto embedding support for vector search that is added as part of the PR #680.
Proof of Work
https://spruce.mongodb.com/version/69695255ad5383000708cb28/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
Checklist
skip-changeloglabel if not needed