From 6105ca50734a6588a6d159a4f0c6f1398a793e5c Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 25 Feb 2023 17:02:55 -0600 Subject: [PATCH] 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. --- internal/nbconn/nbconn_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nbconn/nbconn_test.go b/internal/nbconn/nbconn_test.go index 90597c3e..92bff9c9 100644 --- a/internal/nbconn/nbconn_test.go +++ b/internal/nbconn/nbconn_test.go @@ -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()