aboutsummaryrefslogtreecommitdiffstats
path: root/lib/megaco/test/megaco_mess_user_test.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-07-22 14:54:53 +0200
committerMicael Karlberg <[email protected]>2019-07-22 14:54:53 +0200
commit056e3dfa2837f52e7e2d074d5cc11543a7656cde (patch)
tree4a95d2366cb302b8ecf23441cbde294f8d34749a /lib/megaco/test/megaco_mess_user_test.erl
parent9295544658711636e21fd11e41d3d23169248c7d (diff)
downloadotp-056e3dfa2837f52e7e2d074d5cc11543a7656cde.tar.gz
otp-056e3dfa2837f52e7e2d074d5cc11543a7656cde.tar.bz2
otp-056e3dfa2837f52e7e2d074d5cc11543a7656cde.zip
[megaco|test] Message in "wrong" order cause test case fail
It looked like two messages was received in the "wrong" order, cuasing the request_and_reply_plain test case tro fail (on a windows machine). On closer inspection, the reason was that an "unconditional" receive was made when waiting for a (disconnect) callback. But instead we received a secondary message. So, remove the unconditional receive and instead introduce a timeout (10 seconds).
Diffstat (limited to 'lib/megaco/test/megaco_mess_user_test.erl')
-rw-r--r--lib/megaco/test/megaco_mess_user_test.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/megaco/test/megaco_mess_user_test.erl b/lib/megaco/test/megaco_mess_user_test.erl
index b5a554112e..609c941769 100644
--- a/lib/megaco/test/megaco_mess_user_test.erl
+++ b/lib/megaco/test/megaco_mess_user_test.erl
@@ -86,13 +86,13 @@ reply(Mod, Line, Fun) when is_function(Fun) ->
{?MODULE, Pid, UserCallback} ->
UserReply = Fun(UserCallback),
Pid ! {?MODULE, self(), UserReply},
- UserReply;
- Other ->
- megaco_test_lib:error(Other, Mod, Line),
- {error, Other}
-%% after 1000 ->
-%% megaco_test_lib:error(timeout, Mod, Line),
-%% {error, timeout}
+ UserReply%% ;
+ %% Other ->
+ %% megaco_test_lib:error(Other, Mod, Line),
+ %% {error, Other}
+ after 10000 ->
+ megaco_test_lib:error(timeout, Mod, Line),
+ {error, timeout}
end.
call(UserCallback) ->