@@ -110,25 +110,26 @@ prop_connection_channel_counts(Config) ->
110110 begin
111111 % ensure we begin with no connections
112112 ct :pal (" Init testcase" ),
113- true = validate_counts (Config , []),
113+ rabbit_ct_helpers :await_condition (
114+ fun () -> validate_counts (Config , []) end ,
115+ 60000 ),
114116 Cons = lists :foldl (fun (Op , Agg ) ->
115117 execute_op (Config , Op , Agg )
116118 end , [], Ops ),
117- % % TODO retry a few times
118119 ct :pal (" Check testcase" ),
119- Res = retry_for (
120- fun () ->
121- force_stats (Config ),
122- validate_counts (Config , Cons ) end ,
123- 60 ),
120+ rabbit_ct_helpers : await_condition (
121+ fun () ->
122+ force_stats (Config ),
123+ validate_counts (Config , Cons ) end ,
124+ 60000 ),
124125 ct :pal (" Cleanup testcase" ),
125126 rabbit_ct_helpers :await_condition (
126127 fun () ->
127128 cleanup (Cons ),
128129 force_stats (Config ),
129130 validate_counts (Config , []) end ,
130131 60000 ),
131- Res
132+ true
132133 end ).
133134
134135validate_counts (Config , Conns ) ->
@@ -291,14 +292,3 @@ dump_table(Config, Table) ->
291292 ct :pal (? LOW_IMPORTANCE , " Node 0: Dump of table ~tp :~n~tp~n " , [Table , Data ]),
292293 Data0 = rabbit_ct_broker_helpers :rpc (Config , 1 , ets , tab2list , [Table ]),
293294 ct :pal (? LOW_IMPORTANCE , " Node 1: Dump of table ~tp :~n~tp~n " , [Table , Data0 ]).
294-
295- retry_for (_Fun , 0 ) ->
296- false ;
297- retry_for (Fun , Retries ) ->
298- case Fun () of
299- true ->
300- true ;
301- false ->
302- timer :sleep (1000 ),
303- retry_for (Fun , Retries - 1 )
304- end .
0 commit comments