Skip to content

Commit c18778b

Browse files
authored
Merge branch 'main' into rm-black
2 parents fd20dd0 + c45d294 commit c18778b

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

integrations/pinecone/tests/conftest.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import asyncio
22
import time
3+
import uuid
34

45
import pytest
56
import pytest_asyncio
67
from 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

1510
from 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(

0 commit comments

Comments
 (0)