diff options
| author | Dave Cheney <dave@cheney.net> | 2013-02-14 10:11:16 +1100 |
|---|---|---|
| committer | Dave Cheney <dave@cheney.net> | 2013-02-14 10:11:16 +1100 |
| commit | 8c30b3f038fe140d7f05ebe60d090e1d4a2eb3b5 (patch) | |
| tree | d88aba42423fbf8cc2e348eb68e58b245cc7666b /src | |
| parent | ee9d148ce159581dfd0005dede6c56d1d4afeafe (diff) | |
| download | go-8c30b3f038fe140d7f05ebe60d090e1d4a2eb3b5.tar.xz | |
net: remove noisy test for issue 3590
The test for issue 3590 causes an error to be printed to stderr when run (although the error is obscured during go test std). This is confusing for people who get breakage in the net package as the error is harmless and most likely unrelated to their build breakage.
Given the way the test works, by reaching into the guts of the netFD, I can't see a way to silence the error without adding a bunch of code to support the test, therefore I am suggesting the test be removed before Go 1.1 ships.
R=alex.brainman, mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/7307110
Diffstat (limited to 'src')
| -rw-r--r-- | src/pkg/net/fd_unix_test.go | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/pkg/net/fd_unix_test.go b/src/pkg/net/fd_unix_test.go index fd1385ef93..664ef1bf19 100644 --- a/src/pkg/net/fd_unix_test.go +++ b/src/pkg/net/fd_unix_test.go @@ -12,54 +12,6 @@ import ( "testing" ) -// Issue 3590. netFd.AddFD should return an error -// from the underlying pollster rather than panicing. -func TestAddFDReturnsError(t *testing.T) { - ln := newLocalListener(t).(*TCPListener) - defer ln.Close() - connected := make(chan bool) - go func() { - for { - c, err := ln.Accept() - if err != nil { - return - } - connected <- true - defer c.Close() - } - }() - - c, err := DialTCP("tcp", nil, ln.Addr().(*TCPAddr)) - if err != nil { - t.Fatal(err) - } - defer c.Close() - <-connected - - // replace c's pollServer with a closed version. - ps, err := newPollServer() - if err != nil { - t.Fatal(err) - } - ps.poll.Close() - c.conn.fd.pollServer = ps - - var b [1]byte - _, err = c.Read(b[:]) - if err, ok := err.(*OpError); ok { - if err.Op == "addfd" { - return - } - if err, ok := err.Err.(*OpError); ok { - // the err is sometimes wrapped by another OpError - if err.Op == "addfd" { - return - } - } - } - t.Error("unexpected error:", err) -} - var chkReadErrTests = []struct { n int err error |
