aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_session_cache_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-12-06 11:32:35 +0100
committerIngela Anderton Andin <[email protected]>2011-12-06 11:32:35 +0100
commitbecb65f433c26133a519e367540a25d1036010b6 (patch)
treefb945b1eb81b3bc85a93d6dd821634fd9a89194d /lib/ssl/test/ssl_session_cache_SUITE.erl
parent026a7c04fdf7add071ee61b1ac24a5ebbcbb73db (diff)
downloadotp-becb65f433c26133a519e367540a25d1036010b6.tar.gz
otp-becb65f433c26133a519e367540a25d1036010b6.tar.bz2
otp-becb65f433c26133a519e367540a25d1036010b6.zip
Improve ssl session cleanup test
Check last delay timer for both client and server side to avoide timing issues.
Diffstat (limited to 'lib/ssl/test/ssl_session_cache_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_session_cache_SUITE.erl21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/ssl/test/ssl_session_cache_SUITE.erl b/lib/ssl/test/ssl_session_cache_SUITE.erl
index 7f782233ef..491aa893c2 100644
--- a/lib/ssl/test/ssl_session_cache_SUITE.erl
+++ b/lib/ssl/test/ssl_session_cache_SUITE.erl
@@ -225,9 +225,10 @@ session_cleanup(Config)when is_list(Config) ->
check_timer(SessionTimer),
test_server:sleep(?DELAY *2), %% Delay time + some extra time
- DelayTimer = get_delay_timer(),
+ {ServerDelayTimer, ClientDelayTimer} = get_delay_timers(),
- check_timer(DelayTimer),
+ check_timer(ServerDelayTimer),
+ check_timer(ClientDelayTimer),
test_server:sleep(?SLEEP), %% Make sure clean has had time to run
@@ -250,16 +251,22 @@ check_timer(Timer) ->
check_timer(Timer)
end.
-get_delay_timer() ->
+get_delay_timers() ->
{status, _, _, StatusInfo} = sys:get_status(whereis(ssl_manager)),
[_, _,_, _, Prop] = StatusInfo,
State = ssl_test_lib:state(Prop),
case element(7, State) of
- undefined ->
+ {undefined, undefined} ->
+ test_server:sleep(?SLEEP),
+ get_delay_timers();
+ {undefined, _} ->
+ test_server:sleep(?SLEEP),
+ get_delay_timers();
+ {_, undefined} ->
test_server:sleep(?SLEEP),
- get_delay_timer();
- DelayTimer ->
- DelayTimer
+ get_delay_timers();
+ DelayTimers ->
+ DelayTimers
end.
%%--------------------------------------------------------------------
session_cache_process_list(doc) ->