Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/ssh/test/ssh_connection_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,19 @@ do_interrupted_send(Config, SendSize, EchoSize, SenderResult) ->
ct:log("~p:~p ~p - That's what we expect :)",
[?MODULE,?LINE, SenderResult]),
ok;
{SenderPid, {error, closed}} ->
%% We called ssh:close(ConnectionRef) above while
%% the sender was still pushing data (10 MB send,
%% only 4 MB echoed). The connection teardown can
%% race with the ongoing send, causing it to return
%% {error, closed} instead of ok. Both outcomes are
%% valid — the test's purpose is to verify the
%% listener received correct echo data, not that
%% the sender completes the full 10 MB transfer.
ct:log("~p:~p sender got {error,closed} after "
"ssh:close - acceptable race",
[?MODULE,?LINE]),
ok;
Msg ->
ct:log("~p:~p Not expected send result: ~p",[?MODULE,?LINE,Msg]),
{fail, "Not expected msg"}
Expand Down
Loading