Skip to content

Commit

Permalink
re-enable non-blocking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WeidiDeng committed Dec 9, 2023
1 parent 3194d69 commit bb5f79c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"runtime"
"sync"
"syscall"
"testing"
"time"
)
Expand All @@ -28,9 +29,10 @@ var glTestFdLock sync.Mutex
//
//nolint:paralleltest // Potential in (*os.File).Fd().
func TestReadDeadline(t *testing.T) {
t.Skip("Disabling while investigating race.")

ptmx, success := prepare(t)
if err := syscall.SetNonblock(int(ptmx.Fd()), true); err != nil {
t.Fatalf("Error: set non block: %s", err)
}

if err := ptmx.SetDeadline(time.Now().Add(timeout / 10)); err != nil {
if errors.Is(err, os.ErrNoDeadline) {
Expand Down Expand Up @@ -59,9 +61,10 @@ func TestReadDeadline(t *testing.T) {
//
//nolint:paralleltest // Potential in (*os.File).Fd().
func TestReadClose(t *testing.T) {
t.Skip("Disabling while investigating race.")

ptmx, success := prepare(t)
if err := syscall.SetNonblock(int(ptmx.Fd()), true); err != nil {
t.Fatalf("Error: set non block: %s", err)
}

go func() {
time.Sleep(timeout / 10)
Expand Down

0 comments on commit bb5f79c

Please sign in to comment.