diff options
author | Björn Gustavsson <[email protected]> | 2016-03-11 10:05:44 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-11 10:05:44 +0100 |
commit | d369571f10ccc5ebf4548f4dbc74efe649c5e669 (patch) | |
tree | 30c4344e66d86ef619568e3b193795659d3ba5b0 /lib/kernel/test/pdict_SUITE.erl | |
parent | 12e365ce0af0e93d87aee614d33f71a3b6c3bcc8 (diff) | |
parent | 0ba20cd6d43e277593b59463d2c2959bb6db0957 (diff) | |
download | otp-d369571f10ccc5ebf4548f4dbc74efe649c5e669.tar.gz otp-d369571f10ccc5ebf4548f4dbc74efe649c5e669.tar.bz2 otp-d369571f10ccc5ebf4548f4dbc74efe649c5e669.zip |
Merge branch 'bjorn/kernel/modernize-tests'
* bjorn/kernel/modernize-tests:
Remove ?line macros
Fix comments
gen_tcp_misc_SUITE: Use unique node names
Eliminate use of the ?t macro
Eliminate use of doc and suite clauses
Replace use of test_server:capture*/0 with ct:capture*/0
Eliminate use test_server:format()
Eliminate use of test_server:sleep/1
Eliminate use of test_server:fail/0,1
Eliminate use of ?config() macro
Modernize timetraps
disk_log_SUITE: Remove vestiges of VxWorks support
Conflicts:
lib/kernel/test/code_SUITE.erl
Diffstat (limited to 'lib/kernel/test/pdict_SUITE.erl')
-rw-r--r-- | lib/kernel/test/pdict_SUITE.erl | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/lib/kernel/test/pdict_SUITE.erl b/lib/kernel/test/pdict_SUITE.erl index 80025d2fd9..a89fdf4797 100644 --- a/lib/kernel/test/pdict_SUITE.erl +++ b/lib/kernel/test/pdict_SUITE.erl @@ -18,7 +18,6 @@ %% %CopyrightEnd% %% -module(pdict_SUITE). -%% NB: The ?line macro cannot be used when testing the dictionary. -include_lib("common_test/include/ct.hrl"). @@ -38,14 +37,14 @@ -export([other_process/2]). init_per_testcase(_Case, Config) -> - ?line Dog = ?t:timetrap(test_server:minutes(10)), - [{watchdog, Dog} | Config]. -end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), - test_server:timetrap_cancel(Dog), + Config. + +end_per_testcase(_Case, _Config) -> ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> [simple, complicated, heavy, simple_all_keys, info, @@ -67,10 +66,7 @@ end_per_group(_GroupName, Config) -> Config. -simple(doc) -> - ["Tests simple functionality in process dictionary."]; -simple(suite) -> - []; +%% Tests simple functionality in process dictionary. simple(Config) when is_list(Config) -> XX = get(), ok = match_keys(XX), @@ -111,7 +107,7 @@ complicated(Config) when is_list(Config) -> Previous = get(), ok = match_keys(Previous), Previous = erase(), - N = case ?t:is_debug() of + N = case test_server:is_debug() of false -> 500000; true -> 5000 end, @@ -145,10 +141,7 @@ comp_4([{{key,_}=K,{value,_}=Val}|T]) -> comp_4(T); comp_4([]) -> ok. -heavy(doc) -> - ["Tests heavy usage of the process dictionary"]; -heavy(suite) -> - []; +%% Tests heavy usage of the process dictionary. heavy(Config) when is_list(Config) -> XX = get(), erase(), @@ -158,7 +151,7 @@ heavy(Config) when is_list(Config) -> ?M([],get()), time(5000), ?M([],get()), - case {os:type(),?t:is_debug()} of + case {os:type(),test_server:is_debug()} of {_,true} -> ok; _ -> time(50000), @@ -187,10 +180,7 @@ simple_all_keys_del_loop([K|Ks]) -> ok = match_keys(get()), simple_all_keys_del_loop(Ks). -info(doc) -> - ["Tests process_info(Pid, dictionary)"]; -info(suite) -> - []; +%% Tests process_info(Pid, dictionary). info(Config) when is_list(Config) -> L = [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p, q,r,s,t,u,v,x,y,z,'A','B','C','D'], |