From 30de8744bbb59992b23a7f6a4b059119f67e71a0 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 14 Jun 2011 11:16:06 +0200 Subject: Changed test case so that we do not have to make ets-table named --- lib/ssl/test/ssl_session_cache_SUITE.erl | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'lib/ssl/test/ssl_session_cache_SUITE.erl') diff --git a/lib/ssl/test/ssl_session_cache_SUITE.erl b/lib/ssl/test/ssl_session_cache_SUITE.erl index 62d404092f..070ea6d2d7 100644 --- a/lib/ssl/test/ssl_session_cache_SUITE.erl +++ b/lib/ssl/test/ssl_session_cache_SUITE.erl @@ -207,9 +207,14 @@ session_cleanup(Config)when is_list(Config) -> %% Make sure session is registered test_server:sleep(?SLEEP), + {status, _, _, StatusInfo} = sys:get_status(whereis(ssl_manager)), + [_, _,_, _, Prop] = StatusInfo, + State = state(Prop), + Cache = element(2, State), + Id = proplists:get_value(session_id, SessionInfo), - CSession = ssl_session_cache:lookup(ssl_otp_session_cache, {{Hostname, Port}, Id}), - SSession = ssl_session_cache:lookup(ssl_otp_session_cache, {Port, Id}), + CSession = ssl_session_cache:lookup(Cache, {{Hostname, Port}, Id}), + SSession = ssl_session_cache:lookup(Cache, {Port, Id}), true = CSession =/= undefined, true = SSession =/= undefined, @@ -218,13 +223,18 @@ session_cleanup(Config)when is_list(Config) -> test_server:sleep(5000), %% Expire time test_server:sleep(?SLEEP *4), %% Clean up delay - undefined = ssl_session_cache:lookup(ssl_otp_session_cache, {{Hostname, Port}, Id}), - undefined = ssl_session_cache:lookup(ssl_otp_session_cache, {Port, Id}), + undefined = ssl_session_cache:lookup(Cache, {{Hostname, Port}, Id}), + undefined = ssl_session_cache:lookup(Cache, {Port, Id}), process_flag(trap_exit, false), ssl_test_lib:close(Server), ssl_test_lib:close(Client). +state([{data,[{"State", State}]} | _]) -> + State; +state([_ | Rest]) -> + state(Rest). + %%-------------------------------------------------------------------- session_cache_process_list(doc) -> ["Test reuse of sessions (short handshake)"]; -- cgit v1.2.3