aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZandra <[email protected]>2016-04-25 08:06:35 +0200
committerZandra <[email protected]>2016-04-25 08:50:42 +0200
commit6daadced12f5984696e46d88af5e3833639e9a77 (patch)
treeeb7d996ad0ee0a314900af3957b8920d84769764
parent1113f29e8427d8c58f2dd7f7d941af163f5cf210 (diff)
downloadotp-6daadced12f5984696e46d88af5e3833639e9a77.tar.gz
otp-6daadced12f5984696e46d88af5e3833639e9a77.tar.bz2
otp-6daadced12f5984696e46d88af5e3833639e9a77.zip
update monitor_nodes_otp_6481_test-we only guarantee message order
Messages can be lost, but the order is guaranteed. This change weakens the test, but does it according to our guarantees.
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index d6208dac91..c932b54783 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -912,13 +912,13 @@ 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).
{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),
@@ -931,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) ->