rabbit_ct_helpers: Don't stop testsuite monitor if it's not running

This could happen if the setup run steps failed before we start the
testsuite monitor. In this case, `?config()` was returning `undefined`
and we tried to use it as a PID.
This commit is contained in:
Jean-Sébastien Pédron 2018-06-11 17:04:21 +02:00
parent e307ea45b1
commit 8834a13a79
1 changed files with 4 additions and 1 deletions

View File

@ -461,7 +461,10 @@ load_elixir(Config) ->
Config.
stop_long_running_testsuite_monitor(Config) ->
?config(long_running_testsuite_monitor, Config) ! stop,
case get_config(Config, long_running_testsuite_monitor) of
undefined -> ok;
Pid -> Pid ! stop
end,
Config.
long_running_testsuite_monitor(TimerRef, Testcases) ->