diff options
author | Anders Svensson <anders@erlang.org> | 2011-10-07 16:26:45 +0200 |
---|---|---|
committer | Anders Svensson <anders@erlang.org> | 2011-10-07 17:49:05 +0200 |
commit | ac2810603b7aaad24129fadf887d9e8deff31d2f (patch) | |
tree | 6536cbfa0fc5d89c808cc6ee74f3f155bbc679cf /lib/diameter/test/diameter_transport_SUITE.erl | |
parent | d01551f400e2a7944dcc10319be0c9f248ca3179 (diff) | |
download | otp-ac2810603b7aaad24129fadf887d9e8deff31d2f.tar.gz otp-ac2810603b7aaad24129fadf887d9e8deff31d2f.tar.bz2 otp-ac2810603b7aaad24129fadf887d9e8deff31d2f.zip |
Make testsuites more robust in case of init failure
In particular, move code out of init_per_suite since failure
causes end_per_suite to be skipped. Cleanup is simpler if both
init and cleanup happen as testcases.
Diffstat (limited to 'lib/diameter/test/diameter_transport_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_transport_SUITE.erl | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/diameter/test/diameter_transport_SUITE.erl b/lib/diameter/test/diameter_transport_SUITE.erl index d545859fe8..064e5caa67 100644 --- a/lib/diameter/test/diameter_transport_SUITE.erl +++ b/lib/diameter/test/diameter_transport_SUITE.erl @@ -33,10 +33,12 @@ end_per_suite/1]). %% testcases --export([tcp_accept/1, +-export([start/1, + tcp_accept/1, tcp_connect/1, sctp_accept/1, - sctp_connect/1]). + sctp_connect/1, + stop/1]). -export([accept/1, connect/1, @@ -101,7 +103,7 @@ suite() -> [{timetrap, {minutes, 2}}]. all() -> - [{group, all} | tc()]. + [start | tc()] ++ [{group, all}, stop]. groups() -> [{all, [parallel], tc()}]. @@ -119,10 +121,17 @@ end_per_group(_, _) -> ok. init_per_suite(Config) -> - ok = diameter:start(), [{sctp, have_sctp()} | Config]. end_per_suite(_Config) -> + ok. + +%% =========================================================================== + +start(_Config) -> + ok = diameter:start(). + +stop(_Config) -> ok = diameter:stop(). %% =========================================================================== |