aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorZandra <[email protected]>2016-05-04 09:05:02 +0200
committerZandra <[email protected]>2016-05-04 09:05:02 +0200
commitefb19c7d8edf92f268fe42df2ba47c329b98ec2f (patch)
tree8043648e9db8ee153557d837445cda8c903e1d76 /lib/kernel/test
parenta152a8a4e6df5fca0ca6fb0a62ac8fea41b99571 (diff)
parent6daadced12f5984696e46d88af5e3833639e9a77 (diff)
downloadotp-efb19c7d8edf92f268fe42df2ba47c329b98ec2f.tar.gz
otp-efb19c7d8edf92f268fe42df2ba47c329b98ec2f.tar.bz2
otp-efb19c7d8edf92f268fe42df2ba47c329b98ec2f.zip
Merge branch 'zandra/erl_distribution_SUITE-cuddle'
* zandra/erl_distribution_SUITE-cuddle: update monitor_nodes_otp_6481_test-we only guarantee message order increase timeout since the old one risked flapping test remove no_msg timeout, since its not needed and cause flapping
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index bf1548591a..eb58e92224 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -634,7 +634,7 @@ monitor_nodes_nodedown_reason(Config) when is_list(Config) ->
stop_node(N4),
true = net_kernel:disconnect(N2),
TickTime = net_kernel:get_net_ticktime(),
- SleepTime = TickTime + (TickTime div 4),
+ SleepTime = TickTime + (TickTime div 2),
spawn(N3, fun () ->
block_emu(SleepTime*1000),
halt()
@@ -911,15 +911,14 @@ monitor_nodes_otp_6481_test(Config, TestType) when is_list(Config) ->
%% Verify that '{nodeup, Node}' comes before '{NodeMsg, 1}' (the message
%% bringing up the connection).
- no_msgs(500),
{nodeup, Node} = receive Msg1 -> Msg1 end,
- {NodeMsg, 1} = receive Msg2 -> Msg2 end,
+ {NodeMsg, N} = receive Msg2 -> Msg2 end,
%% msg stream has begun, kill the node
RemotePid ! {self(), kill_it},
%% Verify that '{nodedown, Node}' comes after the last '{NodeMsg, N}'
%% message.
- {nodedown, Node} = flush_node_msgs(NodeMsg, 2),
+ {nodedown, Node} = flush_node_msgs(NodeMsg, N+1),
no_msgs(500),
Mon = erlang:monitor(process, MN),
@@ -932,8 +931,10 @@ monitor_nodes_otp_6481_test(Config, TestType) when is_list(Config) ->
flush_node_msgs(NodeMsg, No) ->
case receive Msg -> Msg end of
- {NodeMsg, No} -> flush_node_msgs(NodeMsg, No+1);
- OtherMsg -> OtherMsg
+ {NodeMsg, N} when N >= No ->
+ flush_node_msgs(NodeMsg, N+1);
+ OtherMsg ->
+ OtherMsg
end.
node_loop_send(Pid, Msg, No) ->