Fix TestInternalNonBlockingWriteWithDeadline(t
The test was relying on sending so big a message that the write blocked. However, it appears that on Windows the TCP connections over localhost have an very large or infinite sized buffer. Change the test to simply set the deadline to the current time before triggering the write.
This commit is contained in:
@@ -313,7 +313,7 @@ func TestInternalNonBlockingWriteWithDeadline(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, deadlockSize, n)
|
||||
|
||||
err = conn.SetDeadline(time.Now().Add(100 * time.Millisecond))
|
||||
err = conn.SetDeadline(time.Now())
|
||||
require.NoError(t, err)
|
||||
|
||||
err = conn.Flush()
|
||||
|
||||
Reference in New Issue
Block a user