Skip to content

Commit f6765bd

Browse files
committed
Try to ensure index data remains separate
1 parent 91688a9 commit f6765bd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/integration/test_query.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import uuid
12
from datetime import timedelta
23

34
import pytest
@@ -144,13 +145,14 @@ def sorted_range_query():
144145

145146
@pytest.fixture
146147
def index(sample_data, redis_url, worker_id):
148+
unique_id = str(uuid.uuid4())[:8] # Use first 8 chars of UUID for brevity
147149

148150
# construct a search index from the schema
149151
index = SearchIndex.from_dict(
150152
{
151153
"index": {
152-
"name": f"user_index_{worker_id}",
153-
"prefix": f"v1_{worker_id}",
154+
"name": f"user_index_{worker_id}_{unique_id}",
155+
"prefix": f"v1_{worker_id}_{unique_id}",
154156
"storage_type": "hash",
155157
},
156158
"fields": [
@@ -196,13 +198,14 @@ def hash_preprocess(item: dict) -> dict:
196198

197199
@pytest.fixture
198200
def L2_index(sample_data, redis_url, worker_id):
201+
unique_id = str(uuid.uuid4())[:8] # Use first 8 chars of UUID for brevity
199202

200203
# construct a search index from the schema
201204
index = SearchIndex.from_dict(
202205
{
203206
"index": {
204-
"name": f"L2_index_{worker_id}",
205-
"prefix": f"L2_index_{worker_id}",
207+
"name": f"L2_index_{worker_id}_{unique_id}",
208+
"prefix": f"L2_index_{worker_id}_{unique_id}",
206209
"storage_type": "hash",
207210
},
208211
"fields": [

0 commit comments

Comments
 (0)