Use ports from cluster

This commit is contained in:
Igor Nikonov 2023-11-16 12:09:13 +00:00
parent 07452b613a
commit 4d16c096a1
2 changed files with 4 additions and 2 deletions

View File

@ -583,6 +583,7 @@ class ClickHouseCluster:
self.rabbitmq_host = "rabbitmq1"
self.rabbitmq_ip = None
self.rabbitmq_port = 5672
self.rabbitmq_secure_port = 5671
self.rabbitmq_dir = p.abspath(p.join(self.instances_dir, "rabbitmq"))
self.rabbitmq_cookie_file = os.path.join(self.rabbitmq_dir, "erlang.cookie")
self.rabbitmq_logs_dir = os.path.join(self.rabbitmq_dir, "logs")
@ -1316,6 +1317,7 @@ class ClickHouseCluster:
self.with_rabbitmq = True
env_variables["RABBITMQ_HOST"] = self.rabbitmq_host
env_variables["RABBITMQ_PORT"] = str(self.rabbitmq_port)
env_variables["RABBITMQ_SECURE_PORT"] = str(self.rabbitmq_secure_port)
env_variables["RABBITMQ_LOGS"] = self.rabbitmq_logs_dir
env_variables["RABBITMQ_LOGS_FS"] = "bind"
env_variables["RABBITMQ_COOKIE_FILE"] = self.rabbitmq_cookie_file

View File

@ -110,9 +110,9 @@ def rabbitmq_setup_teardown():
],
)
def test_rabbitmq_select(rabbitmq_cluster, secure):
port = 5672
port = cluster.rabbitmq_port
if secure:
port = 5671
port = cluster.rabbitmq_secure_port
instance.query(
"""