set timeout to 2s in TestClientWebsocketPing

This commit is contained in:
bnovil 2023-10-18 16:39:43 +08:00
parent 403523fd7c
commit 37e3512587

View file

@ -215,7 +215,7 @@ func TestClientWebsocketPing(t *testing.T) {
var ( var (
sendPing = make(chan struct{}) sendPing = make(chan struct{})
server = wsPingTestServer(t, sendPing) server = wsPingTestServer(t, sendPing)
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 2*time.Second)
) )
defer cancel() defer cancel()
defer server.Shutdown(ctx) defer server.Shutdown(ctx)