aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index fa36b424ce..6aacc8ecf4 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -452,8 +452,16 @@ verify_fun_fail(Config) when is_list(Config) ->
verify_fail_always(_Certificate, _Event, _State) ->
%% Create an ETS table, to record the fact that the verify function ran.
- ets:new(verify_fun_ran, [public, named_table, {heir, whereis(ssl_tls_dist_proxy), {}}]),
- ets:insert(verify_fun_ran, {verify_fail_always_ran, true}),
+ %% Spawn a new process, to avoid the ETS table disappearing.
+ Parent = self(),
+ spawn(
+ fun() ->
+ ets:new(verify_fun_ran, [public, named_table]),
+ ets:insert(verify_fun_ran, {verify_fail_always_ran, true}),
+ Parent ! go_ahead,
+ timer:sleep(infinity)
+ end),
+ receive go_ahead -> ok end,
{fail, bad_certificate}.
%%--------------------------------------------------------------------
@@ -490,8 +498,16 @@ verify_fun_pass(Config) when is_list(Config) ->
verify_pass_always(_Certificate, _Event, State) ->
%% Create an ETS table, to record the fact that the verify function ran.
- ets:new(verify_fun_ran, [public, named_table, {heir, whereis(ssl_tls_dist_proxy), {}}]),
- ets:insert(verify_fun_ran, {verify_pass_always_ran, true}),
+ %% Spawn a new process, to avoid the ETS table disappearing.
+ Parent = self(),
+ spawn(
+ fun() ->
+ ets:new(verify_fun_ran, [public, named_table]),
+ ets:insert(verify_fun_ran, {verify_pass_always_ran, true}),
+ Parent ! go_ahead,
+ timer:sleep(infinity)
+ end),
+ receive go_ahead -> ok end,
{valid, State}.
%%--------------------------------------------------------------------
crl_check_pass() ->