Skip to content

Commit

Permalink
test: fix a flaky test case of TestShutdown
Browse files Browse the repository at this point in the history
Fixes #477
  • Loading branch information
panjf2000 committed Jun 12, 2023
1 parent eca1d0c commit c839bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ func (t *testShutdownServer) OnTick() (delay time.Duration, action Action) {
}

func testShutdown(t *testing.T, network, addr string) {
events := &testShutdownServer{tester: t, network: network, addr: addr, N: 256}
events := &testShutdownServer{tester: t, network: network, addr: addr, N: 100}
err := Run(events, network+"://"+addr, WithTicker(true), WithReadBufferCap(512), WithWriteBufferCap(512))
assert.NoError(t, err)
require.Equal(t, 0, int(events.clients), "did not close all clients")
Expand Down

0 comments on commit c839bfb

Please sign in to comment.