1%%-------------------------------------------------------------------- 2%% %CopyrightBegin% 3%% 4%% Copyright Ericsson AB 2013-2018. All Rights Reserved. 5%% 6%% Licensed under the Apache License, Version 2.0 (the "License"); 7%% you may not use this file except in compliance with the License. 8%% You may obtain a copy of the License at 9%% 10%% http://www.apache.org/licenses/LICENSE-2.0 11%% 12%% Unless required by applicable law or agreed to in writing, software 13%% distributed under the License is distributed on an "AS IS" BASIS, 14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15%% See the License for the specific language governing permissions and 16%% limitations under the License. 17%% 18%% %CopyrightEnd% 19%% 20%%---------------------------------------------------------------------- 21%% File: r1_SUITE.erl 22%%---------------------------------------------------------------------- 23-module(r1_SUITE). 24-include_lib("common_test/include/ct.hrl"). 25 26-compile(export_all). 27 28%% Default timetrap timeout (set in init_per_testcase). 29-define(default_timeout, ?t:seconds(30)). 30 31all() -> 32 testcases() ++ [{group,g}, tc2]. 33 34groups() -> 35 [{g,testcases()}]. 36 37testcases() -> 38 [tc1,tc2]. 39 40init_per_suite(Config) -> 41 Config. 42 43end_per_suite(Config) -> 44 Config. 45 46init_per_group(_, Config) -> 47 Config. 48 49end_per_group(_Group, Config) -> 50 Config. 51 52init_per_testcase(_Case, Config) -> 53 Dog = test_server:timetrap(?default_timeout), 54 [{watchdog, Dog}|Config]. 55 56end_per_testcase(_Case, Config) -> 57 Dog=?config(watchdog, Config), 58 test_server:timetrap_cancel(Dog), 59 ok. 60 61%%%----------------------------------------------------------------- 62%%% Test cases 63tc1(_Config) -> 64 timer:sleep(1000), 65 ok. 66 67tc2(_Config) -> 68 ok. 69