Ver Fonte

clientv3/integration: Add err check to TestDialTLSNoConfig to prevent nil pointer dereference on c.Close()

Joe Betz há 7 anos atrás
pai
commit
3b84117f54
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      clientv3/integration/dial_test.go

+ 3 - 0
clientv3/integration/dial_test.go

@@ -79,6 +79,9 @@ func TestDialTLSNoConfig(t *testing.T) {
 		DialTimeout: time.Second,
 		DialTimeout: time.Second,
 		DialOptions: []grpc.DialOption{grpc.WithBlock()},
 		DialOptions: []grpc.DialOption{grpc.WithBlock()},
 	})
 	})
+	if err != nil {
+		t.Fatal(err)
+	}
 	defer c.Close()
 	defer c.Close()
 
 
 	// TODO: this should not be required when we set grpc.WithBlock()
 	// TODO: this should not be required when we set grpc.WithBlock()