aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorMasatake Daimon <[email protected]>2013-05-17 13:01:20 +0900
committerIngela Anderton Andin <[email protected]>2014-02-05 10:32:24 +0100
commit7a97e384ea8d4d17ed6a24508a58359ece175e16 (patch)
treeeb1df10c1496f5e52ad57a45b6c9377d6bacb23e /lib/inets/test
parent2c0dabc1ea0330c765e7621483e7a96d751db0aa (diff)
downloadotp-7a97e384ea8d4d17ed6a24508a58359ece175e16.tar.gz
otp-7a97e384ea8d4d17ed6a24508a58359ece175e16.tar.bz2
otp-7a97e384ea8d4d17ed6a24508a58359ece175e16.zip
Fix {stream, {self, once}} in httpc
Previously the only difference between {stream, self} and {stream, {self, once}} was an extra Pid in the stream_start message due to a bug in httpc_handler. It was immediately sending a bunch of messages till the end instead of waiting for httpc:stream_next/1 being called.
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpc_SUITE.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 299c429d5e..51dc7c0f87 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -1687,6 +1687,15 @@ receive_streamed_body(RequestId, Body, Pid) ->
ct:print("~p:receive_streamed_body -> requested next stream ~n", [?MODULE]),
receive
{http, {RequestId, stream, BinBodyPart}} ->
+ %% Make sure the httpc hasn't sent us the next 'stream'
+ %% without our request.
+ receive
+ {http, {RequestId, stream, _}} = Msg ->
+ ct:fail({unexpected_flood_of_stream, Msg})
+ after
+ 1000 ->
+ ok
+ end,
receive_streamed_body(RequestId,
<<Body/binary, BinBodyPart/binary>>,
Pid);