Skip to content

Commit e0cd801

Browse files
committed
server_test: wait for OnClose in TestClientEOF.
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]>
1 parent 712429a commit e0cd801

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

server_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ func TestClientEOF(t *testing.T) {
363363
t.Fatal(err)
364364
}
365365

366+
client.UserOnCloseWait(ctx)
367+
366368
// server shutdown, but we still make a call.
367369
if err := client.Call(ctx, serviceName, "Test", tp, tp); err == nil {
368370
t.Fatalf("expected error when calling against shutdown server")

0 commit comments

Comments
 (0)