File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ init_per_suite(Config) ->
3838 [Node |_ ] = Cluster = ts_setup :start_cluster (1 ),
3939 rt :wait_until_pingable (Node ),
4040 rt :wait_for_service (Node , riak_kv ),
41- [{cluster , Cluster } | Config ].
41+ Cfg = [{cluster , Cluster } | Config ],
42+ ok = wait_for_web_machine (60 , Cfg ),
43+ Cfg .
4244
4345end_per_suite (_Config ) ->
4446 ok .
@@ -89,6 +91,17 @@ all() ->
8991% % column_names_def_1() ->
9092% % [<<"a">>, <<"b">>, <<"c">>].
9193
94+ wait_for_web_machine (Secs , _ ) when Secs =< 0 ->
95+ {error , " Webmachine not ready in time." };
96+ wait_for_web_machine (Secs , Cfg ) ->
97+ % % use SHOW TABLES to detect readiness because it does not modify state
98+ case execute_query (" SHOW TABLES" , Cfg ) of
99+ {ok , " 200" , _ , _ } ->
100+ ok ;
101+ {ok , " 503" , _ , _ } ->
102+ timer :sleep (1000 ),
103+ wait_for_web_machine (Secs - 1 , Cfg )
104+ end .
92105
93106table_def_bob () ->
94107 " create table bob ("
You can’t perform that action at this time.
0 commit comments