aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/test/test_server_SUITE.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-11-15 10:15:24 +0100
committerSiri Hansen <[email protected]>2012-11-16 11:45:38 +0100
commit1a8e644f07418f27fad173201381012cb827282f (patch)
tree0767185b185a3ee7447e326a27617937c32f6c78 /lib/test_server/test/test_server_SUITE.erl
parent15ae7c1f17f4516475e9ea60942fb60464a7e3de (diff)
downloadotp-1a8e644f07418f27fad173201381012cb827282f.tar.gz
otp-1a8e644f07418f27fad173201381012cb827282f.tar.bz2
otp-1a8e644f07418f27fad173201381012cb827282f.zip
[test_server] Cancel timetrap for break in end_per_testcase
Any call to test_server:break/1 should cancel all active timetramps. In some cases, Suite:end_per_testcase/2 is executed on a different process than the test case itself, and if test_server:break/1 would be called from there, the timetraps would not be cancelled. This has been corrected.
Diffstat (limited to 'lib/test_server/test/test_server_SUITE.erl')
-rw-r--r--lib/test_server/test/test_server_SUITE.erl17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/test_server/test/test_server_SUITE.erl b/lib/test_server/test/test_server_SUITE.erl
index d20528d43b..95a3423fef 100644
--- a/lib/test_server/test/test_server_SUITE.erl
+++ b/lib/test_server/test/test_server_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -79,7 +79,8 @@ groups() ->
all() ->
[test_server_SUITE, test_server_parallel01_SUITE,
test_server_conf02_SUITE, test_server_conf01_SUITE,
- test_server_skip_SUITE, test_server_shuffle01_SUITE].
+ test_server_skip_SUITE, test_server_shuffle01_SUITE,
+ test_server_break_SUITE].
%%--------------------------------------------------------------------
@@ -115,6 +116,10 @@ test_server_conf02_SUITE(Config) ->
run_test_server_tests("test_server_conf02_SUITE", 26, 0, 12,
12, 0, 0, 0, 0, 26, Config).
+test_server_break_SUITE(Config) ->
+ D = run_test_server_tests("test_server_break_SUITE", 8, 2, 6,
+ 4, 0, 0, 0, 2, 6, Config),
+ D.
run_test_server_tests(SuiteName, NCases, NFail, NExpected, NSucc,
NUsrSkip, NAutoSkip,
@@ -139,9 +144,11 @@ run_test_server_tests(SuiteName, NCases, NFail, NExpected, NSucc,
rpc:call(Node,test_server_ctrl, stop, []),
{ok,Data} = test_server_test_lib:parse_suite(
- hd(filelib:wildcard(
- filename:join([WorkDir,SuiteName++".logs",
- "run*","suite.log"])))),
+ lists:last(
+ lists:sort(
+ filelib:wildcard(
+ filename:join([WorkDir,SuiteName++".logs",
+ "run*","suite.log"]))))),
check([{"Number of cases",NCases,Data#suite.n_cases},
{"Number failed",NFail,Data#suite.n_cases_failed},
{"Number expected",NExpected,Data#suite.n_cases_expected},