relax the checking on error string

This commit is contained in:
Menghan Li
2017-03-02 15:21:41 -08:00
parent 8b2e129857
commit ba23d25e3a

View File

@ -60,7 +60,7 @@ func TestStopBeforeServe(t *testing.T) {
// server.Serve is responsible for closing the listener, even if the
// server was already stopped.
err = lis.Close()
if got, want := ErrorDesc(err), "use of closed network connection"; !strings.Contains(got, want) {
if got, want := ErrorDesc(err), "use of closed"; !strings.Contains(got, want) {
t.Errorf("Close() error = %q, want %q", got, want)
}
}