aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-10-16 18:28:30 +0200
committerSiri Hansen <[email protected]>2012-10-30 11:18:41 +0100
commit2794f452c8197a9c242c7e3652481f4f4d6e3422 (patch)
tree15d2e6624a81ead29ee1e10c37f95d4888f7909c /lib/test_server
parente68de4fee8e23e8f465db84b51a108eba80dc808 (diff)
downloadotp-2794f452c8197a9c242c7e3652481f4f4d6e3422.tar.gz
otp-2794f452c8197a9c242c7e3652481f4f4d6e3422.tar.bz2
otp-2794f452c8197a9c242c7e3652481f4f4d6e3422.zip
[test_server] Multiply timers with timetrap_scale_factor when starting nodes
In test_server_ctrl:start_node and wait_for_node, the timer in controller_call was not multiplied by the timetrap_scale_factor. This caused unexpected behaviour since the scale factor was used furhter down the the code, and timeout would happen in unexpected order when cover was running.
Diffstat (limited to 'lib/test_server')
-rw-r--r--lib/test_server/src/test_server_ctrl.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl
index 7f04e2eb23..e0f66ddb54 100644
--- a/lib/test_server/src/test_server_ctrl.erl
+++ b/lib/test_server/src/test_server_ctrl.erl
@@ -5119,7 +5119,7 @@ get_target_info() ->
%% Called by test_server. See test_server:start_node/3 for details
start_node(Name, Type, Options) ->
- T = 10 * ?ACCEPT_TIMEOUT, % give some extra time
+ T = 10 * ?ACCEPT_TIMEOUT * test_server:timetrap_scale_factor(),
format(minor, "Attempt to start ~w node ~p with options ~p",
[Type, Name, Options]),
case controller_call({start_node,Name,Type,Options}, T) of
@@ -5164,7 +5164,8 @@ start_node(Name, Type, Options) ->
%% when the new node has contacted test_server_ctrl again
wait_for_node(Slave) ->
- case catch controller_call({wait_for_node,Slave},10000) of
+ T = 10000 * test_server:timetrap_scale_factor(),
+ case catch controller_call({wait_for_node,Slave},T) of
{'EXIT',{timeout,_}} -> {error,timeout};
ok -> ok
end.