Skip to content

Commit 36fd79c

Browse files
Merge pull request #14268 from rabbitmq/revert-14264-await-condition-for-exceptions
Revert "Handle exceptions in rabbit_ct_helpers:await_condition_with_retries/2 to continue waiting"
2 parents 36731ef + 50f2308 commit 36fd79c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,16 +1130,12 @@ await_condition(ConditionFun, Timeout) ->
11301130
await_condition_with_retries(_ConditionFun, 0) ->
11311131
ct:fail("Condition did not materialize in the expected period of time");
11321132
await_condition_with_retries(ConditionFun, RetriesLeft) ->
1133-
try ConditionFun() of
1133+
case ConditionFun() of
11341134
false ->
11351135
timer:sleep(50),
11361136
await_condition_with_retries(ConditionFun, RetriesLeft - 1);
11371137
true ->
11381138
ok
1139-
catch
1140-
_:_ ->
1141-
timer:sleep(50),
1142-
await_condition_with_retries(ConditionFun, RetriesLeft - 1)
11431139
end.
11441140

11451141
%% Pass in any EUnit test object. Example:

0 commit comments

Comments
 (0)