From 6c839390082cee45f7e2eb1750d6e32d1c8460f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 4 Aug 2023 10:14:58 +0200 Subject: [PATCH] rabbit_ct_client_helpers: Add a timeout to `open_channel/2` [Why] Exactly like in commit b165adb958213ac1d86bd7c02cc74350eb330738, we don't need to wait indefinitely for a channel to open. If it lasts, there is a problem. There is probably a weakness/bug in that basic channels manager that would explain those indefinite operations though. --- .../rabbitmq_ct_client_helpers/src/rabbit_ct_client_helpers.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deps/rabbitmq_ct_client_helpers/src/rabbit_ct_client_helpers.erl b/deps/rabbitmq_ct_client_helpers/src/rabbit_ct_client_helpers.erl index eef702e511..17075221f4 100644 --- a/deps/rabbitmq_ct_client_helpers/src/rabbit_ct_client_helpers.erl +++ b/deps/rabbitmq_ct_client_helpers/src/rabbit_ct_client_helpers.erl @@ -217,6 +217,8 @@ open_channel(Config, Node) -> Pid ! {open_channel, self()}, receive Ch when is_pid(Ch) -> Ch + after 60_000 -> + ct:fail("Timed out waiting for connection to open") end. open_connection_and_channel(Config) ->