aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-06-03 14:32:54 +0200
committerSiri Hansen <[email protected]>2016-06-18 15:35:28 +0200
commit7176e321c085cbcdd044f2dfc2b02bbba2c50e7b (patch)
tree6bd05e1c0d6dc1e223f450d900422cfe8179b5a9 /lib
parent4336a65b7e2580866c20fa6646209212dcaeb122 (diff)
downloadotp-7176e321c085cbcdd044f2dfc2b02bbba2c50e7b.tar.gz
otp-7176e321c085cbcdd044f2dfc2b02bbba2c50e7b.tar.bz2
otp-7176e321c085cbcdd044f2dfc2b02bbba2c50e7b.zip
[sasl test] Do GC before measuring and comparing time
release_handler_SUITE:otp_9395_*_many_mods sometimes fail on slow machines. This commit adds an explicit GC before each 'install_release' so GC during test is avoided.
Diffstat (limited to 'lib')
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index 559a63fcaf..ad58bb6b7b 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1103,6 +1103,7 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) ->
[RelVsn2, filename:join(Rel2Dir, "sys.config")]),
%% First, install release directly and check how much time it takes
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst0,{ok, _, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),
@@ -1129,6 +1130,7 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) ->
%% Finally install release after check and purge, and check that
%% this install was faster than the first.
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]),
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst2,{ok, _RelVsn1, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),
@@ -1200,6 +1202,7 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) ->
[RelVsn2, filename:join(Rel2Dir, "sys.config")]),
%% First, install release directly and check how much time it takes
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst0,{ok, _, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),
@@ -1226,6 +1229,7 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) ->
%% Finally install release after check and purge, and check that
%% this install was faster than the first.
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]),
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst2,{ok, _RelVsn1, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),