From f18d6eb9d6900e21cefe3ce44b644015a0444279 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 31 May 2016 14:36:40 +0200 Subject: erts: Fix distribution_SUITE:bulk_send_bigbig on windows The granualarity of the windows time sometimes makes timer:tc return 0 as the time taken for the test. Change this to use the most common time instead. --- erts/emulator/test/distribution_SUITE.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'erts/emulator/test') diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl index 258ae57e18..0b5fdbd7ff 100644 --- a/erts/emulator/test/distribution_SUITE.erl +++ b/erts/emulator/test/distribution_SUITE.erl @@ -182,8 +182,13 @@ bulk_sendsend2(Terms, BinSize, BusyBufSize) -> {ok, NodeSend} = start_node(bulk_sender, "+zdbbl " ++ integer_to_list(BusyBufSize)), _Send = spawn(NodeSend, erlang, apply, [fun sendersender/4, [self(), Recv, Bin, Terms]]), {Elapsed, {_TermsN, SizeN}, MonitorCount} = - receive {sendersender, BigRes} -> - BigRes + receive + %% On some platforms (windows), the time taken is 0 so we + %% simulate that some little time has passed. + {sendersender, {0.0,T,MC}} -> + {0.0015, T, MC}; + {sendersender, BigRes} -> + BigRes end, stop_node(NodeRecv), stop_node(NodeSend), -- cgit v1.2.3