diff --git a/clientv3/integration/watch_test.go b/clientv3/integration/watch_test.go index ce5d7ed0e..e33e7605a 100644 --- a/clientv3/integration/watch_test.go +++ b/clientv3/integration/watch_test.go @@ -609,6 +609,9 @@ func TestConfigurableWatchProgressNotifyInterval(t *testing.T) { } func TestWatchRequestProgress(t *testing.T) { + if integration.ThroughProxy { + t.Skipf("grpc-proxy does not support WatchProgress yet") + } testCases := []struct { name string watchers []string diff --git a/integration/cluster_direct.go b/integration/cluster_direct.go index a3764d9ce..0db7b232e 100644 --- a/integration/cluster_direct.go +++ b/integration/cluster_direct.go @@ -23,7 +23,7 @@ import ( pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb" ) -const throughProxy = false +const ThroughProxy = false func toGRPC(c *clientv3.Client) grpcAPI { return grpcAPI{ diff --git a/integration/cluster_proxy.go b/integration/cluster_proxy.go index 0b024c719..b5e2b9571 100644 --- a/integration/cluster_proxy.go +++ b/integration/cluster_proxy.go @@ -27,7 +27,7 @@ import ( "go.uber.org/zap" ) -const throughProxy = true +const ThroughProxy = true var ( pmu sync.Mutex diff --git a/integration/v3_watch_test.go b/integration/v3_watch_test.go index 1717c0537..38cc17dd9 100644 --- a/integration/v3_watch_test.go +++ b/integration/v3_watch_test.go @@ -1242,7 +1242,7 @@ func TestV3WatchCancellation(t *testing.T) { } var expected string - if throughProxy { + if ThroughProxy { // grpc proxy has additional 2 watches open expected = "3" } else { @@ -1279,7 +1279,7 @@ func TestV3WatchCloseCancelRace(t *testing.T) { } var expected string - if throughProxy { + if ThroughProxy { // grpc proxy has additional 2 watches open expected = "2" } else { diff --git a/proxy/grpcproxy/watch.go b/proxy/grpcproxy/watch.go index fc62c4aa3..bbde0ad59 100644 --- a/proxy/grpcproxy/watch.go +++ b/proxy/grpcproxy/watch.go @@ -272,7 +272,8 @@ func (wps *watchProxyStream) recvLoop() error { wps.delete(uv.CancelRequest.WatchId) wps.lg.Debug("cancel watcher", zap.Int64("watcherId", uv.CancelRequest.WatchId)) default: - panic("not implemented") + // Panic or Fatalf would allow to network clients to crash the serve remotely. + wps.lg.Error("not supported request type by gRPC proxy", zap.Stringer("request", req)) } } }