mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #12311 from ptabor/20200917-proxy-watcher-progress-panic
integration,proxy: Skip WatchRequestProgress test in grpc-proxy mode.
This commit is contained in:
commit
132098b028
@ -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
|
||||
|
@ -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{
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const throughProxy = true
|
||||
const ThroughProxy = true
|
||||
|
||||
var (
|
||||
pmu sync.Mutex
|
||||
|
@ -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 {
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user