aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-06-29 12:24:28 +0200
committerIngela Anderton Andin <[email protected]>2011-06-30 08:38:11 +0200
commitc3e4a7662216f59f68e34b5e4121c5c4c8427dcc (patch)
treef4641a5803872460721941a4db03787270a8f10c /lib/ssl
parentee679e41535dd83aba7c8fb55fa12bdc6e89313c (diff)
downloadotp-c3e4a7662216f59f68e34b5e4121c5c4c8427dcc.tar.gz
otp-c3e4a7662216f59f68e34b5e4121c5c4c8427dcc.tar.bz2
otp-c3e4a7662216f59f68e34b5e4121c5c4c8427dcc.zip
Improved test case so that it will not fail due to last_delay_timer = undefined
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/test/ssl_session_cache_SUITE.erl21
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/ssl/test/ssl_session_cache_SUITE.erl b/lib/ssl/test/ssl_session_cache_SUITE.erl
index f80ac3c1a9..5ea45018e6 100644
--- a/lib/ssl/test/ssl_session_cache_SUITE.erl
+++ b/lib/ssl/test/ssl_session_cache_SUITE.erl
@@ -223,15 +223,14 @@ session_cleanup(Config)when is_list(Config) ->
%% Make sure session has expired and been cleaned up
check_timer(SessionTimer),
- test_server:sleep(?DELAY), %% Delay time + some extra time
+ test_server:sleep(?DELAY *2), %% Delay time + some extra time
- {status, _, _, StatusInfo1} = sys:get_status(whereis(ssl_manager)),
- [_, _,_, _, Prop1] = StatusInfo1,
- State1 = state(Prop1),
- DelayTimer = element(7, State1),
+ DelayTimer = get_delay_timer(),
check_timer(DelayTimer),
+ test_server:sleep(?SLEEP), %% Make sure clean has had to run
+
undefined = ssl_session_cache:lookup(Cache, {{Hostname, Port}, Id}),
undefined = ssl_session_cache:lookup(Cache, {Port, Id}),
@@ -253,6 +252,18 @@ check_timer(Timer) ->
test_server:sleep(Int),
check_timer(Timer)
end.
+
+get_delay_timer() ->
+ {status, _, _, StatusInfo} = sys:get_status(whereis(ssl_manager)),
+ [_, _,_, _, Prop] = StatusInfo,
+ State = state(Prop),
+ case element(7, State) of
+ undefined ->
+ test_server:sleep(?SLEEP),
+ get_delay_timer();
+ DelayTimer ->
+ DelayTimer
+ end.
%%--------------------------------------------------------------------
session_cache_process_list(doc) ->
["Test reuse of sessions (short handshake)"];