aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-12-16 17:53:52 +0100
committerAnders Svensson <[email protected]>2011-12-16 17:53:52 +0100
commit8a7b17a6d63377c323ab137ca8c0847280f9e24a (patch)
treed4580aba992085a9c39d7569a8f1e10b59f3d073 /lib
parent719a4747d814913eef9b416da5aa6c638e8d2477 (diff)
downloadotp-8a7b17a6d63377c323ab137ca8c0847280f9e24a.tar.gz
otp-8a7b17a6d63377c323ab137ca8c0847280f9e24a.tar.bz2
otp-8a7b17a6d63377c323ab137ca8c0847280f9e24a.zip
Update watchdog suite
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/test/diameter_watchdog_SUITE.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/diameter/test/diameter_watchdog_SUITE.erl b/lib/diameter/test/diameter_watchdog_SUITE.erl
index b40d7c104d..ff40326947 100644
--- a/lib/diameter/test/diameter_watchdog_SUITE.erl
+++ b/lib/diameter/test/diameter_watchdog_SUITE.erl
@@ -306,11 +306,8 @@ watchdog(Type, Ref, TPid, Wd) ->
Opts = [{transport_module, ?MODULE},
{transport_config, TPid},
{watchdog_timer, Wd}],
- monitor(diameter_watchdog:start({Type, Ref},
- {false, Opts, false, ?SERVICE})).
-
-monitor(Pid) ->
- erlang:monitor(process, Pid),
+ {_MRef, Pid} = diameter_watchdog:start({Type, Ref},
+ {false, Opts, false, ?SERVICE}),
Pid.
%% ===========================================================================
@@ -350,6 +347,10 @@ init(_, _, TPid, _) ->
monitor(TPid),
3.
+monitor(Pid) ->
+ erlang:monitor(process, Pid),
+ Pid.
+
%% Generate a unique hostname for the faked peer.
hostname() ->
lists:flatten(io_lib:format("~p-~p-~p", tuple_to_list(now()))).