Ver código fonte

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 anos atrás
pai
commit
0b588ed7a0
1 arquivos alterados com 1 adições e 0 exclusões
  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 {