Skip to content

server_test: wait for OnClose in TestClientEOF.#150

Merged
fuweid merged 1 commit intocontainerd:mainfrom
klihub:fixes/server-test/TestClientEOF
Jul 28, 2023
Merged

server_test: wait for OnClose in TestClientEOF.#150
fuweid merged 1 commit intocontainerd:mainfrom
klihub:fixes/server-test/TestClientEOF

Conversation

@klihub
Copy link
Member

@klihub klihub commented Jul 24, 2023

In the test for client Call() failing with ErrClosed on a closed server, wait for the client's OnClose() handler to get triggered to make sure closing the socket had properly been administered on the client's side. Otherwise trying a new Call() might fail with some other error than ErrClosed, for instance ENOTCONN.

This commit was split out from #145 as a PR of its own.

@klihub klihub force-pushed the fixes/server-test/TestClientEOF branch 4 times, most recently from 7850c9d to 519cb47 Compare July 27, 2023 14:29
In the test for client Call failing with ErrClosed on a closed
server, wait for the client's OnClose handler to get triggered
to make sure closing the socket had properly been administered
on the client's side. Otherwise trying a new Call() might fail
with some other error than ErrClosed, for instance ENOTCONN.

Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub force-pushed the fixes/server-test/TestClientEOF branch from 519cb47 to e0cd801 Compare July 27, 2023 14:59
@klihub klihub requested a review from Iceber July 27, 2023 15:04
Copy link
Member

@Iceber Iceber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fuweid fuweid merged commit 05e0d07 into containerd:main Jul 28, 2023
@klihub klihub deleted the fixes/server-test/TestClientEOF branch July 28, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants