Skip to content

Commit 6105ca5

Browse files
committed
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.
1 parent 8f46c75 commit 6105ca5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/nbconn/nbconn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func TestInternalNonBlockingWriteWithDeadline(t *testing.T) {
313313
require.NoError(t, err)
314314
require.EqualValues(t, deadlockSize, n)
315315

316-
err = conn.SetDeadline(time.Now().Add(100 * time.Millisecond))
316+
err = conn.SetDeadline(time.Now())
317317
require.NoError(t, err)
318318

319319
err = conn.Flush()

0 commit comments

Comments
 (0)