diff options
author | Siri Hansen <[email protected]> | 2016-05-25 15:53:23 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-05-26 15:08:27 +0200 |
commit | ef7b3e6494c434a6f3a99a21076ba08d282d8be5 (patch) | |
tree | b98564fb04ee3765363c2c9555154256ab8c6a07 /lib/stdlib/test | |
parent | cabe113ee5e4a137e16ad2cf6c6a0bbb8889fdb6 (diff) | |
download | otp-ef7b3e6494c434a6f3a99a21076ba08d282d8be5.tar.gz otp-ef7b3e6494c434a6f3a99a21076ba08d282d8be5.tar.bz2 otp-ef7b3e6494c434a6f3a99a21076ba08d282d8be5.zip |
Wait for process to die before next call
gen_server_SUITE:start often fails since a call which is expected to
give 'noproc' error instead gives 'stopped' error. This happens when
the call is done before the process is really dead. To overcome this
problem, we now wait for the process exit before doing the call.
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/gen_server_SUITE.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl index 3242511f4a..338cd3dc0a 100644 --- a/lib/stdlib/test/gen_server_SUITE.erl +++ b/lib/stdlib/test/gen_server_SUITE.erl @@ -185,7 +185,7 @@ start(Config) when is_list(Config) -> gen_server:start({global, my_test_name}, gen_server_SUITE, [], []), ok = gen_server:call({global, my_test_name}, stop), - ct:sleep(1), + busy_wait_for_process(Pid4,600), {'EXIT', {noproc,_}} = (catch gen_server:call(Pid4, started_p, 10)), %% global register linked @@ -214,7 +214,7 @@ start(Config) when is_list(Config) -> gen_server:start({via, dummy_via, my_test_name}, gen_server_SUITE, [], []), ok = gen_server:call({via, dummy_via, my_test_name}, stop), - ct:sleep(1), + busy_wait_for_process(Pid6,600), {'EXIT', {noproc,_}} = (catch gen_server:call(Pid6, started_p, 10)), %% via register linked |