aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-06-16 11:53:03 +0200
committerIngela Anderton Andin <[email protected]>2011-06-16 11:53:03 +0200
commitbd1e97408b2b8922d96d9dcda027a1dca342366a (patch)
tree978df39ab621aca719b1f0232e6984071efd7b8b
parent1f0b0ec093e2edf13539706b336e9915396e2e99 (diff)
parent30de8744bbb59992b23a7f6a4b059119f67e71a0 (diff)
downloadotp-bd1e97408b2b8922d96d9dcda027a1dca342366a.tar.gz
otp-bd1e97408b2b8922d96d9dcda027a1dca342366a.tar.bz2
otp-bd1e97408b2b8922d96d9dcda027a1dca342366a.zip
Merge branch 'ia/ssl/test-case-without-named-table' into major
* ia/ssl/test-case-without-named-table: Changed test case so that we do not have to make ets-table named
-rw-r--r--lib/ssl/src/ssl_session_cache.erl2
-rw-r--r--lib/ssl/test/ssl_session_cache_SUITE.erl18
2 files changed, 15 insertions, 5 deletions
diff --git a/lib/ssl/src/ssl_session_cache.erl b/lib/ssl/src/ssl_session_cache.erl
index ae7c67bb98..c1be6691be 100644
--- a/lib/ssl/src/ssl_session_cache.erl
+++ b/lib/ssl/src/ssl_session_cache.erl
@@ -36,7 +36,7 @@
%% Description: Return table reference. Called by ssl_manager process.
%%--------------------------------------------------------------------
init(_) ->
- ets:new(cache_name(), [named_table, set, protected]).
+ ets:new(cache_name(), [set, protected]).
%%--------------------------------------------------------------------
-spec terminate(cache_ref()) -> any(). %%
diff --git a/lib/ssl/test/ssl_session_cache_SUITE.erl b/lib/ssl/test/ssl_session_cache_SUITE.erl
index 3ec887f165..5d96b457ed 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*20), %% Clean up delay (very small in this test case) + some extra time
- 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)"];