Skip to content

Commit 852be95

Browse files
committed
Fix NamespaceAlreadyExistsError in test
1 parent 3f863f3 commit 852be95

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/integration/test_database_iceberg/test_partition_timezone.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ def create_clickhouse_iceberg_database(
136136

137137
def test_partition_timezone(started_cluster):
138138
catalog = load_catalog_impl(started_cluster)
139-
catalog.create_namespace("timezone_ns")
139+
namespace = f"timezone_ns_{uuid.uuid4()}"
140+
catalog.create_namespace(namespace)
140141
table = create_table(
141142
catalog,
142-
"timezone_ns",
143+
namespace,
143144
"tz_table",
144145
)
145146

@@ -156,7 +157,7 @@ def test_partition_timezone(started_cluster):
156157
# server timezone is Asia/Istanbul (UTC+3)
157158
assert node.query(f"""
158159
SELECT datetime, value
159-
FROM {CATALOG_NAME}.`timezone_ns.tz_table`
160+
FROM {CATALOG_NAME}.`{namespace}.tz_table`
160161
ORDER BY datetime
161162
""", timeout=10) == TSV(
162163
[
@@ -168,7 +169,7 @@ def test_partition_timezone(started_cluster):
168169
# partitioning works correctly
169170
assert node.query(f"""
170171
SELECT datetime, value
171-
FROM {CATALOG_NAME}.`timezone_ns.tz_table`
172+
FROM {CATALOG_NAME}.`{namespace}.tz_table`
172173
WHERE datetime >= '2024-01-02 00:00:00'
173174
ORDER BY datetime
174175
""", timeout=10) == TSV(

0 commit comments

Comments
 (0)