Skip to content

Commit f7b89bd

Browse files
authored
Merge pull request ClickHouse#80646 from azat/tests/glue-iceberg-overlap
tests: fix flaky hms/glue/iceberg tests due to port overlaps
2 parents 7d50e5d + 3cafd5f commit f7b89bd

File tree

6 files changed

+9
-56
lines changed

6 files changed

+9
-56
lines changed

tests/integration/compose/docker_compose_glue_catalog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ services:
2323
aliases:
2424
- warehouse.minio
2525
ports:
26-
- 9001:9001
27-
- 9002:9000
26+
- 9001
27+
- 9000
2828
command: ["server", "/data", "--console-address", ":9001"]
2929
mc:
3030
depends_on:

tests/integration/compose/docker_compose_iceberg_hms_catalog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ services:
4545
aliases:
4646
- warehouse.minio
4747
ports:
48-
- 9001:9001
49-
- 9002:9000
48+
- 9001
49+
- 9000
5050
command: ["server", "/data", "--console-address", ":9001"]
5151

5252
mc:

tests/integration/compose/docker_compose_iceberg_rest_catalog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ services:
4343
aliases:
4444
- warehouse.minio
4545
ports:
46-
- 9001:9001
47-
- 9002:9000
46+
- 9001
47+
- 9000
4848
command: ["server", "/data", "--console-address", ":9001"]
4949
mc:
5050
depends_on:

tests/integration/test_database_glue/test.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def load_catalog_impl(started_cluster):
7979
"type": "glue",
8080
"glue.endpoint": BASE_URL_LOCAL_HOST,
8181
"glue.region": "us-east-1",
82-
"s3.endpoint": "http://localhost:9002",
82+
"s3.endpoint": f"http://{started_cluster.get_instance_ip('minio')}:9000",
8383
"s3.access-key-id": "minio",
8484
"s3.secret-access-key": "minio123",
8585
},
@@ -135,22 +135,6 @@ def create_clickhouse_glue_database(
135135
)
136136

137137

138-
def print_objects():
139-
minio_client = Minio(
140-
f"minio:9002",
141-
access_key="minio",
142-
secret_key="minio123",
143-
secure=False,
144-
http_client=urllib3.PoolManager(cert_reqs="CERT_NONE"),
145-
)
146-
147-
objects = list(minio_client.list_objects("warehouse", "", recursive=True))
148-
names = [x.object_name for x in objects]
149-
names.sort()
150-
for name in names:
151-
print(f"Found object: {name}")
152-
153-
154138
@pytest.fixture(scope="module")
155139
def started_cluster():
156140
try:

tests/integration/test_database_hms/test.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def load_catalog_impl(started_cluster):
8181
**{
8282
"uri": "thrift://0.0.0.0:9083",
8383
"type": "hive",
84-
"s3.endpoint": f"http://localhost:9002",
84+
"s3.endpoint": f"http://{started_cluster.get_instance_ip('minio')}:9000",
8585
"s3.access-key-id": "minio",
8686
"s3.secret-access-key": "minio123",
8787
},
@@ -133,21 +133,6 @@ def create_clickhouse_iceberg_database(
133133
"""
134134
)
135135

136-
def print_objects():
137-
minio_client = Minio(
138-
f"localhost:9002",
139-
access_key="minio",
140-
secret_key="minio123",
141-
secure=False,
142-
http_client=urllib3.PoolManager(cert_reqs="CERT_NONE"),
143-
)
144-
145-
objects = list(minio_client.list_objects("warehouse", "", recursive=True))
146-
names = [x.object_name for x in objects]
147-
names.sort()
148-
for name in names:
149-
print(f"Found object: {name}")
150-
151136

152137
@pytest.fixture(scope="module")
153138
def started_cluster():

tests/integration/test_database_iceberg/test.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def load_catalog_impl(started_cluster):
8585
**{
8686
"uri": BASE_URL_LOCAL_RAW,
8787
"type": "rest",
88-
"s3.endpoint": f"http://localhost:9002",
88+
"s3.endpoint": f"http://{started_cluster.get_instance_ip('minio')}:9000",
8989
"s3.access-key-id": "minio",
9090
"s3.secret-access-key": "ClickHouse_Minio_P@ssw0rd",
9191
},
@@ -143,22 +143,6 @@ def create_clickhouse_iceberg_database(
143143
assert "HIDDEN" in show_result
144144

145145

146-
def print_objects():
147-
minio_client = Minio(
148-
f"localhost:9002",
149-
access_key="minio",
150-
secret_key=minio_secret_key,
151-
secure=False,
152-
http_client=urllib3.PoolManager(cert_reqs="CERT_NONE"),
153-
)
154-
155-
objects = list(minio_client.list_objects("warehouse", "", recursive=True))
156-
names = [x.object_name for x in objects]
157-
names.sort()
158-
for name in names:
159-
print(f"Found object: {name}")
160-
161-
162146
@pytest.fixture(scope="module")
163147
def started_cluster():
164148
try:

0 commit comments

Comments
 (0)