From 6025355ce0a4e77602593ffd25daec098f6d91e3 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Thu, 2 Feb 2023 11:37:54 +0100 Subject: [PATCH] tests: Allow configuring progress notify interval in e2e tests Signed-off-by: Marek Siarkowicz --- tests/e2e/cluster_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/e2e/cluster_test.go b/tests/e2e/cluster_test.go index 87bc376f1..48536292e 100644 --- a/tests/e2e/cluster_test.go +++ b/tests/e2e/cluster_test.go @@ -20,6 +20,7 @@ import ( "net/url" "os" "strings" + "time" "go.etcd.io/etcd/etcdserver" ) @@ -135,7 +136,8 @@ type etcdProcessClusterConfig struct { initialCorruptCheck bool authTokenOpts string - MaxConcurrentStreams uint32 // default is math.MaxUint32 + MaxConcurrentStreams uint32 // default is math.MaxUint32 + WatchProcessNotifyInterval time.Duration } // newEtcdProcessCluster launches a new cluster from etcd processes, returning @@ -269,6 +271,10 @@ func (cfg *etcdProcessClusterConfig) etcdServerProcessConfigs() []*etcdServerPro args = append(args, "--max-concurrent-streams", fmt.Sprintf("%d", cfg.MaxConcurrentStreams)) } + if cfg.WatchProcessNotifyInterval != 0 { + args = append(args, "--experimental-watch-progress-notify-interval", cfg.WatchProcessNotifyInterval.String()) + } + etcdCfgs[i] = &etcdServerProcessConfig{ execPath: cfg.execPath, args: args,