diff options
author | Ingela Anderton Andin <[email protected]> | 2011-07-06 09:22:39 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-07-06 09:22:39 +0200 |
commit | b4f55753c8cb7494221c5ad33c0af5c58e5dd568 (patch) | |
tree | 36a839c984110193c590319e46e017c0fc40eae2 | |
parent | e909414b27ab8ea36c4f4fec4779a244434c91f4 (diff) | |
parent | c3e4a7662216f59f68e34b5e4121c5c4c8427dcc (diff) | |
download | otp-b4f55753c8cb7494221c5ad33c0af5c58e5dd568.tar.gz otp-b4f55753c8cb7494221c5ad33c0af5c58e5dd568.tar.bz2 otp-b4f55753c8cb7494221c5ad33c0af5c58e5dd568.zip |
Merge branch 'ia/ssl/improved-test-case' into dev
* ia/ssl/improved-test-case:
Improved test case so that it will not fail due to last_delay_timer = undefined
-rw-r--r-- | lib/ssl/test/ssl_session_cache_SUITE.erl | 21 |
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)"]; |