mirror of
https://github.com/jackc/pgx.git
synced 2025-07-13 07:39:59 +00:00
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:
parent
8f46c75e73
commit
6105ca5073
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user