mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
fix(integration): init AsyncMilvusClient before MilvusIndex
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
This commit is contained in:
parent
e7444c1d9b
commit
733d0c70fe
2 changed files with 77 additions and 22 deletions
|
@ -40,15 +40,12 @@ async def mock_milvus_client() -> MagicMock:
|
|||
"""Create a mock Milvus client with common method behaviors."""
|
||||
client = MagicMock()
|
||||
|
||||
# Mock async collection operations
|
||||
client.has_collection = AsyncMock(return_value=False) # Initially no collection
|
||||
client.create_collection = AsyncMock(return_value=None)
|
||||
client.drop_collection = AsyncMock(return_value=None)
|
||||
|
||||
# Mock async insert operation
|
||||
client.insert = AsyncMock(return_value={"insert_count": 10})
|
||||
|
||||
# Mock async search operation
|
||||
client.search = AsyncMock(
|
||||
return_value=[
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue