File tree Expand file tree Collapse file tree
integrations/pinecone/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import asyncio
22import time
3+ import uuid
34
45import pytest
56import pytest_asyncio
67from haystack .document_stores .types import DuplicatePolicy
7-
8- try :
9- # pinecone-client < 5.0.0
10- from pinecone .core .client .exceptions import NotFoundException
11- except ModuleNotFoundError :
12- # pinecone-client >= 5.0.0
13- from pinecone .exceptions import NotFoundException
8+ from pinecone .exceptions import NotFoundException
149
1510from haystack_integrations .document_stores .pinecone import PineconeDocumentStore
1611
@@ -31,7 +26,7 @@ def document_store(request):
3126 """
3227 index = "default"
3328 # Use a different namespace for each test so we can run them in parallel
34- namespace = f"{ request .node .name } -{ int ( time . time () )} "
29+ namespace = f"{ request .node .name } -{ uuid . uuid4 ( )} "
3530 dimension = 768
3631
3732 store = PineconeDocumentStore (
@@ -72,7 +67,7 @@ async def document_store_async(request):
7267 """
7368 index = "default"
7469 # Use a different namespace for each test so we can run them in parallel
75- namespace = f"{ request .node .name } -{ int ( time . time () )} "
70+ namespace = f"{ request .node .name } -{ uuid . uuid4 ( )} "
7671 dimension = 768
7772
7873 store = PineconeDocumentStore (
You can’t perform that action at this time.
0 commit comments