diff options
author | Björn Gustavsson <[email protected]> | 2012-11-01 12:24:28 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-11-07 14:14:00 +0100 |
commit | 983b1a407119f427a9203769bb94784b1bf0563b (patch) | |
tree | 768060a206b11c9a2dfb4f044f6737d3f670a492 /lib/common_test/src/ct.erl | |
parent | e6c3f2c107366c12edcd7a9b26e08642501fc888 (diff) | |
download | otp-983b1a407119f427a9203769bb94784b1bf0563b.tar.gz otp-983b1a407119f427a9203769bb94784b1bf0563b.tar.bz2 otp-983b1a407119f427a9203769bb94784b1bf0563b.zip |
Handle ct:abort_current_testcase/1 when executing parallel groups
ct:abort_current_testcase/1 (which is a wrapper for the function
with the same name in test_server_ctrl) would not work as expected
when a group with parallel test cases was executing. Essentially,
the abort_current_testcase message would be ignored until the group
has finished and would then abort the end_per_group testcase for
the group.
Since there is no unique current testcase when a parallel group is
executing, we must handle the abort_current_testcase message and
return an error tuple.
Also fix the bug that test_server_ctrl:abort_current_testcase/1
would always return 'ok'.
Diffstat (limited to 'lib/common_test/src/ct.erl')
-rw-r--r-- | lib/common_test/src/ct.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl index 90e4e79ccf..6ecd0a022c 100644 --- a/lib/common_test/src/ct.erl +++ b/lib/common_test/src/ct.erl @@ -987,8 +987,9 @@ get_testdata(Key) -> end. %%%----------------------------------------------------------------- -%%% @spec abort_current_testcase(Reason) -> ok | {error,no_testcase_running} +%%% @spec abort_current_testcase(Reason) -> ok | {error,ErrorReason} %%% Reason = term() +%%% ErrorReason = no_testcase_running | parallel_group %%% %%% @doc <p>When calling this function, the currently executing test case will be aborted. %%% It is the user's responsibility to know for sure which test case is currently |