File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
deps/rabbitmq_peer_discovery_consul/test Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -202,9 +202,19 @@ start_consul(Config) ->
202
202
Cmd = [ConsulBin , " agent" ,
203
203
" -config-dir" , ConsulConfDir ,
204
204
" -log-file" , LogFile ],
205
- ConsulPid = spawn (fun () -> rabbit_ct_helpers : exec (Cmd ) end ),
205
+ ConsulPid = spawn (fun () -> do_start_consul (Cmd ) end ),
206
206
rabbit_ct_helpers :set_config (Config , {consul_pid , ConsulPid }).
207
207
208
+ do_start_consul (Cmd ) ->
209
+ case rabbit_ct_helpers :exec (Cmd ) of
210
+ {ok , Stdout } ->
211
+ ct :pal (" Consul daemon exited:~n~s " , [Stdout ]);
212
+ {error , Reason , Stdout } ->
213
+ ct :pal (
214
+ " Consul daemon exited with error ~0p :~n~s " ,
215
+ [Reason , Stdout ])
216
+ end .
217
+
208
218
stop_consul (Config ) ->
209
219
case rabbit_ct_helpers :get_config (Config , consul_pid ) of
210
220
ConsulPid when is_pid (ConsulPid ) ->
You can’t perform that action at this time.
0 commit comments