aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/ttb.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-10-21 11:06:18 +0200
committerSiri Hansen <[email protected]>2011-10-27 09:38:23 +0200
commita527bdefdd7232a4f9d180d097dbec383542f245 (patch)
tree275e7caccd8cab19044a19a236d5f9c790aa75de /lib/observer/src/ttb.erl
parent86e4b23fb4a11f18834e6b1be76642fbd71b9cf7 (diff)
downloadotp-a527bdefdd7232a4f9d180d097dbec383542f245.tar.gz
otp-a527bdefdd7232a4f9d180d097dbec383542f245.tar.bz2
otp-a527bdefdd7232a4f9d180d097dbec383542f245.zip
Cleanup after testcases in ttb_SUITE
Slave nodes were earlier stopped inside each test case. If a test case failed before this point, a slave node would survive and it might interfere with the next test case causing multiple failures. This commit moves the stopping of slave nodes out to a separate function for each test case - called during end_per_testcase. A minor correction is also done in ttb:ensure_no_overloaded_nodes - the reply message sent back from the ttb process is tagged so only the expected message will be picked from the message queue. Otherwise, for instance nodedown messages from the monitoring of slave nodes (by the test cases) could be received here. Finally, the sleep timer when waiting for trace messages to arrive over tcp/ip is extended a bit since test cases sometimes failed with missing trace messages here.
Diffstat (limited to 'lib/observer/src/ttb.erl')
-rw-r--r--lib/observer/src/ttb.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/observer/src/ttb.erl b/lib/observer/src/ttb.erl
index 072aa165e7..ce88de6852 100644
--- a/lib/observer/src/ttb.erl
+++ b/lib/observer/src/ttb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -519,7 +519,7 @@ ensure_no_overloaded_nodes() ->
[];
_ ->
?MODULE ! {get_overloaded, self()},
- receive O -> O end
+ receive {overloaded,O} -> O end
end,
case Overloaded of
[] -> ok;
@@ -715,7 +715,7 @@ loop(NodeInfo, SessionInfo) ->
lists:keydelete(overloaded, 1, SessionInfo)},
loop(NodeInfo, [{overloaded, [Node|Overloaded]} | SI]);
{get_overloaded, Pid} ->
- Pid ! proplists:get_value(overloaded, SessionInfo, []),
+ Pid ! {overloaded,proplists:get_value(overloaded, SessionInfo, [])},
loop(NodeInfo, SessionInfo);
trace_started ->
case proplists:get_value(timer, SessionInfo) of