0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Fix intermittent test failures in rfc7540_SUITE

This commit is contained in:
Loïc Hoguin 2018-05-22 13:05:15 +02:00
parent dc58eea9b4
commit 633aa89f00
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764

View file

@ -1839,7 +1839,7 @@ half_closed_remote_reject_data(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)),
%% Send a DATA frame on that now half-closed (remote) stream. %% Send a DATA frame on that now half-closed (remote) stream.
@ -1859,7 +1859,7 @@ half_closed_remote_reject_headers(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)),
%% Send a HEADERS frame on that now half-closed (remote) stream. %% Send a HEADERS frame on that now half-closed (remote) stream.
@ -1876,7 +1876,7 @@ half_closed_remote_accept_priority(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)),
%% Send a PRIORITY frame on that now half-closed (remote) stream. %% Send a PRIORITY frame on that now half-closed (remote) stream.
@ -1916,7 +1916,7 @@ half_closed_remote_accept_window_update(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, fin, HeadersBlock)),
%% Send a WINDOW_UPDATE frame on that now half-closed (remote) stream. %% Send a WINDOW_UPDATE frame on that now half-closed (remote) stream.
@ -1938,7 +1938,7 @@ rst_stream_closed_reject_data(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)),
%% Send an RST_STREAM frame to close the stream. %% Send an RST_STREAM frame to close the stream.
@ -1960,7 +1960,7 @@ rst_stream_closed_reject_headers(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)),
%% Send an RST_STREAM frame to close the stream. %% Send an RST_STREAM frame to close the stream.
@ -1980,7 +1980,7 @@ rst_stream_closed_accept_priority(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)),
%% Send an RST_STREAM frame to close the stream. %% Send an RST_STREAM frame to close the stream.
@ -2000,7 +2000,7 @@ rst_stream_closed_ignore_rst_stream(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)),
%% Send an RST_STREAM frame to close the stream. %% Send an RST_STREAM frame to close the stream.
@ -2026,7 +2026,7 @@ rst_stream_closed_reject_window_update(Config) ->
{<<":method">>, <<"GET">>}, {<<":method">>, <<"GET">>},
{<<":scheme">>, <<"http">>}, {<<":scheme">>, <<"http">>},
{<<":authority">>, <<"localhost">>}, %% @todo Correct port number. {<<":authority">>, <<"localhost">>}, %% @todo Correct port number.
{<<":path">>, <<"/">>} {<<":path">>, <<"/long_polling">>}
]), ]),
ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)), ok = gen_tcp:send(Socket, cow_http2:headers(1, nofin, HeadersBlock)),
%% Send an RST_STREAM frame to close the stream. %% Send an RST_STREAM frame to close the stream.