소스 검색

clientv3/integration: use 'transport.IsClosedConnError'

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Gyu-Ho Lee 9 년 전
부모
커밋
6c2fb5105d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      clientv3/integration/metrics_test.go

+ 1 - 1
clientv3/integration/metrics_test.go

@@ -58,7 +58,7 @@ func TestV3ClientMetrics(t *testing.T) {
 		}
 
 		err = srv.Serve(ln)
-		if err != nil && !strings.Contains(err.Error(), "use of closed network connection") {
+		if err != nil && !transport.IsClosedConnError(err) {
 			t.Fatalf("Err serving http requests: %v", err)
 		}
 	}()