Skip to content

Commit 02dc676

Browse files
committed
Better random database names
Gurantee that DB names are unique for the job when there are multiple simultaneous jobs. Somewhat better chances that DB names for a single job are unique
1 parent f9a9a99 commit 02dc676

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/clickhouse-test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,8 +1285,7 @@ class TestCase:
12851285
random.SystemRandom().choice(alphabet) for _ in range(length)
12861286
)
12871287

1288-
database = f"test_{random_str()}"
1289-
1288+
database = f"test_{os.getpid()}_{random_str(16)}"
12901289
clickhouse_execute(
12911290
args,
12921291
"CREATE DATABASE IF NOT EXISTS "

0 commit comments

Comments
 (0)