Skip to content

Commit

Permalink
test: fix the address reuse issue
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Jan 11, 2025
1 parent f136b23 commit f2750ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1604,13 +1604,13 @@ func (t *testDisconnectedAsyncWriteServer) OnTick() (delay time.Duration, action

func TestDisconnectedAsyncWrite(t *testing.T) {
t.Run("async-write", func(t *testing.T) {
events := &testDisconnectedAsyncWriteServer{tester: t, addr: ":9990"}
err := Run(events, "tcp://:9990", WithTicker(true))
events := &testDisconnectedAsyncWriteServer{tester: t, addr: ":10000"}
err := Run(events, "tcp://:10000", WithTicker(true))
assert.NoError(t, err)
})
t.Run("async-writev", func(t *testing.T) {
events := &testDisconnectedAsyncWriteServer{tester: t, addr: ":9991", writev: true}
err := Run(events, "tcp://:9991", WithTicker(true))
events := &testDisconnectedAsyncWriteServer{tester: t, addr: ":10001", writev: true}
err := Run(events, "tcp://:10001", WithTicker(true))
assert.NoError(t, err)
})
}
Expand Down

0 comments on commit f2750ec

Please sign in to comment.