Skip to content

Commit ec97553

Browse files
committed
Randomize index name
1 parent e39fd80 commit ec97553

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/integration/helpers/names.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import hashlib
1+
import uuid
2+
# import hashlib
23

34

45
def generate_name(test_name: str, label: str, max_length: int = 20) -> str:
@@ -11,4 +12,5 @@ def generate_name(test_name: str, label: str, max_length: int = 20) -> str:
1112
since the full length of 64 characters exceeds the allowed length of some fields
1213
in the API. For example, index names must be 45 characters or less.
1314
"""
14-
return hashlib.sha256(f"{test_name}-{label}".encode()).hexdigest()[:max_length]
15+
# return hashlib.sha256(f"{test_name}-{label}".encode()).hexdigest()[:max_length]
16+
return str(uuid.uuid4())

0 commit comments

Comments
 (0)