浏览代码

nettest: break on unexpected error

in the resyncConn, break the read loop on read error.
if error is returned, constantly, and the loop is not breaking,
the test will never finish.
continue to fail the test on this unexpected error is also pointless.

Change-Id: I8f2f5e7b3d37c2a194cbdcde51734580f5b2436d
Reviewed-on: https://go-review.googlesource.com/41332
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Eyal Posener 8 年之前
父节点
当前提交
0b588ed7a0
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      nettest/conntest.go

+ 1 - 0
nettest/conntest.go

@@ -433,6 +433,7 @@ func resyncConn(t *testing.T, c net.Conn) {
 		}
 		if err != nil {
 			t.Errorf("unexpected Read error: %v", err)
+			break
 		}
 	}
 	if err := <-errCh; err != nil {