diff --git a/integration/cluster_direct.go b/integration/cluster_direct.go index 8dd4d0370..2479940c7 100644 --- a/integration/cluster_direct.go +++ b/integration/cluster_direct.go @@ -23,6 +23,8 @@ import ( pb "go.etcd.io/etcd/etcdserver/etcdserverpb" ) +const throughProxy = false + func toGRPC(c *clientv3.Client) grpcAPI { return grpcAPI{ pb.NewClusterClient(c.ActiveConnection()), diff --git a/integration/cluster_proxy.go b/integration/cluster_proxy.go index 055a73883..4a09a48a3 100644 --- a/integration/cluster_proxy.go +++ b/integration/cluster_proxy.go @@ -25,6 +25,8 @@ import ( "go.etcd.io/etcd/proxy/grpcproxy/adapter" ) +const throughProxy = true + var ( pmu sync.Mutex proxies map[*clientv3.Client]grpcClientProxy = make(map[*clientv3.Client]grpcClientProxy) diff --git a/integration/v3_watch_test.go b/integration/v3_watch_test.go index cddc1e999..ccc3f9a56 100644 --- a/integration/v3_watch_test.go +++ b/integration/v3_watch_test.go @@ -1241,7 +1241,15 @@ func TestV3WatchCancellation(t *testing.T) { t.Fatal(err) } - if minWatches != "1" { - t.Fatalf("expected one watch, got %s", minWatches) + var expected string + if throughProxy { + // grpc proxy has additional 2 watches open + expected = "3" + } else { + expected = "1" + } + + if minWatches != expected { + t.Fatalf("expected %s watch, got %s", expected, minWatches) } }