Skip to content

Commit

Permalink
test: match {error, closed} return on malformed stream
Browse files Browse the repository at this point in the history
  • Loading branch information
zmstone committed Dec 4, 2023
1 parent 58524ab commit 6b39baa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/emqtt_quic_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,18 @@ t_multi_streams_packet_malform(Config) ->

case quicer:send(MalformStream, <<0,0,0,0,0,0,0,0,0,0>>) of
{ok, 10} -> ok;
{error, closed} -> ok;
{error, cancelled} -> ok;
{error, stm_send_error, aborted} -> ok
end,

timer:sleep(200),
?assert(is_list(emqtt:info(C))),

{error, stm_send_error, aborted} = quicer:send(MalformStream, <<0,0,0,0,0,0,0,0,0,0>>),
case quicer:send(MalformStream, <<0,0,0,0,0,0,0,0,0,0>>) of
{error, closed} -> ok;
{error, stm_send_error, aborted} -> ok
end,
timer:sleep(200),
?assert(is_list(emqtt:info(C))),

Expand Down

0 comments on commit 6b39baa

Please sign in to comment.