From 50f2308446de32a4c84c2a5b5fcc585d7c19d762 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Tue, 22 Jul 2025 08:02:53 -0700 Subject: [PATCH] Revert "Handle exceptions in rabbit_ct_helpers:await_condition_with_retries/2 to continue waiting" --- deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl b/deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl index 003bc75ba38f..88d1f3ce8540 100644 --- a/deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl +++ b/deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl @@ -1130,16 +1130,12 @@ await_condition(ConditionFun, Timeout) -> await_condition_with_retries(_ConditionFun, 0) -> ct:fail("Condition did not materialize in the expected period of time"); await_condition_with_retries(ConditionFun, RetriesLeft) -> - try ConditionFun() of + case ConditionFun() of false -> timer:sleep(50), await_condition_with_retries(ConditionFun, RetriesLeft - 1); true -> ok - catch - _:_ -> - timer:sleep(50), - await_condition_with_retries(ConditionFun, RetriesLeft - 1) end. %% Pass in any EUnit test object. Example: