4
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
4
%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
19
19
-module(slave_SUITE).
21
-include("test_server.hrl").
21
-include_lib("test_server/include/test_server.hrl").
23
-export([all/1, t_start/1, t_start_link/1,
23
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
24
init_per_group/2,end_per_group/2, t_start/1, t_start_link/1,
24
25
start_link_nodedown/1, errors/1]).
26
27
%% Internal exports.
27
28
-export([fun_init/1, test_errors/1]).
28
29
-export([timeout_test/1, auth_test/1, rsh_test/1, start_a_slave/3]).
31
suite() -> [{ct_hooks,[ts_install_cth]}].
31
34
[t_start_link, start_link_nodedown, t_start, errors].
39
init_per_suite(Config) ->
42
end_per_suite(_Config) ->
45
init_per_group(_GroupName, Config) ->
48
end_per_group(_GroupName, Config) ->
33
52
t_start_link(suite) -> [];
34
t_start_link(Config) when list(Config) ->
53
t_start_link(Config) when is_list(Config) ->
35
54
?line Dog = test_server:timetrap(test_server:seconds(20)),
37
56
%% Define useful variables.
81
100
%% Test that slave:start_link() works when the master exits.
83
102
start_link_nodedown(suite) -> [];
84
start_link_nodedown(Config) when list(Config) ->
103
start_link_nodedown(Config) when is_list(Config) ->
85
104
?line Dog = test_server:timetrap(test_server:seconds(20)),
87
106
%% Define useful variables.
160
179
%% in slave is 32 seconds).
162
181
errors(suite) -> [];
163
errors(Config) when list(Config) ->
182
errors(Config) when is_list(Config) ->
164
183
?line Dog = test_server:timetrap(test_server:seconds(50)),
166
185
?line process_flag(trap_exit, true),