aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_session_cache_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-06-16 11:25:30 +0200
committerIngela Anderton Andin <[email protected]>2011-06-16 11:25:30 +0200
commitd4761d4c6247e0ae3864228b84bee0fb8a0db01b (patch)
tree27e413ba19b3d1dceca671b3831d61ba353129ad /lib/ssl/test/ssl_session_cache_SUITE.erl
parent099f7ed216ab80e7ffa0618fdd77f2e221d052b4 (diff)
parent30de8744bbb59992b23a7f6a4b059119f67e71a0 (diff)
downloadotp-d4761d4c6247e0ae3864228b84bee0fb8a0db01b.tar.gz
otp-d4761d4c6247e0ae3864228b84bee0fb8a0db01b.tar.bz2
otp-d4761d4c6247e0ae3864228b84bee0fb8a0db01b.zip
Merge branch 'ia/ssl/test-case-without-named-table' into dev
* ia/ssl/test-case-without-named-table: Changed test case so that we do not have to make ets-table named
Diffstat (limited to 'lib/ssl/test/ssl_session_cache_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_session_cache_SUITE.erl18
1 files changed, 14 insertions, 4 deletions
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)"];