aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_session_cache_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-06-23 10:08:51 +0200
committerIngela Anderton Andin <[email protected]>2015-06-23 10:08:51 +0200
commit7cff27e14e051b6ee15f564335eb8e685e1639c1 (patch)
treeb97f48f3482bd7f0651acdaab4eba69709a8c88f /lib/ssl/test/ssl_session_cache_SUITE.erl
parentc57c5c83acb3a21b52304bc53cbdf32e0dda3690 (diff)
parent566cbee917638f596c5d46bd0aff331a66f5c8d2 (diff)
downloadotp-7cff27e14e051b6ee15f564335eb8e685e1639c1.tar.gz
otp-7cff27e14e051b6ee15f564335eb8e685e1639c1.tar.bz2
otp-7cff27e14e051b6ee15f564335eb8e685e1639c1.zip
Merge branch 'ia/ssl/modern-timetrap'
* ia/ssl/modern-timetrap: ssl: Make init functions fail if make_certs:all fails ssl: Avoid sleep ssl: modernize timetrap handling
Diffstat (limited to 'lib/ssl/test/ssl_session_cache_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_session_cache_SUITE.erl36
1 files changed, 14 insertions, 22 deletions
diff --git a/lib/ssl/test/ssl_session_cache_SUITE.erl b/lib/ssl/test/ssl_session_cache_SUITE.erl
index 43bb8f53b2..8ddc5db4b2 100644
--- a/lib/ssl/test/ssl_session_cache_SUITE.erl
+++ b/lib/ssl/test/ssl_session_cache_SUITE.erl
@@ -51,20 +51,15 @@ groups() ->
[].
init_per_suite(Config0) ->
- Dog = ct:timetrap(?LONG_TIMEOUT *2),
catch crypto:stop(),
try crypto:start() of
ok ->
ssl:start(),
- %% make rsa certs using oppenssl
- Result =
- (catch make_certs:all(?config(data_dir, Config0),
- ?config(priv_dir, Config0))),
- ct:log("Make certs ~p~n", [Result]),
-
- Config1 = ssl_test_lib:make_dsa_cert(Config0),
- Config = ssl_test_lib:cert_options(Config1),
- [{watchdog, Dog} | Config]
+ %% make rsa certs using
+ {ok, _} = make_certs:all(?config(data_dir, Config0),
+ ?config(priv_dir, Config0)),
+ Config = ssl_test_lib:make_dsa_cert(Config0),
+ ssl_test_lib:cert_options(Config)
catch _:_ ->
{skip, "Crypto did not start"}
end.
@@ -86,24 +81,20 @@ init_per_testcase(session_cache_process_mnesia, Config) ->
mnesia:start(),
init_customized_session_cache(mnesia, Config);
-init_per_testcase(session_cleanup, Config0) ->
- Config = lists:keydelete(watchdog, 1, Config0),
- Dog = ct:timetrap(?TIMEOUT),
+init_per_testcase(session_cleanup, Config) ->
ssl:stop(),
application:load(ssl),
application:set_env(ssl, session_lifetime, 5),
application:set_env(ssl, session_delay_cleanup_time, ?DELAY),
ssl:start(),
- [{watchdog, Dog} | Config];
+ ct:timetrap({seconds, 20}),
+ Config;
-init_per_testcase(_TestCase, Config0) ->
- Config = lists:keydelete(watchdog, 1, Config0),
- Dog = ct:timetrap(?TIMEOUT),
- [{watchdog, Dog} | Config].
+init_per_testcase(_TestCase, Config) ->
+ ct:timetrap({seconds, 5}),
+ Config.
-init_customized_session_cache(Type, Config0) ->
- Config = lists:keydelete(watchdog, 1, Config0),
- Dog = ct:timetrap(?TIMEOUT),
+init_customized_session_cache(Type, Config) ->
ssl:stop(),
application:load(ssl),
application:set_env(ssl, session_cb, ?MODULE),
@@ -113,7 +104,8 @@ init_customized_session_cache(Type, Config0) ->
Config)),
ets:new(ssl_test, [named_table, public, set]),
ets:insert(ssl_test, {type, Type}),
- [{watchdog, Dog} | Config].
+ ct:timetrap({seconds, 5}),
+ Config.
end_per_testcase(session_cache_process_list, Config) ->
application:unset_env(ssl, session_cb),