diff --git a/tests/framework/e2e/cluster.go b/tests/framework/e2e/cluster.go index 3da0ff9a8f2..ddcc4578b3b 100644 --- a/tests/framework/e2e/cluster.go +++ b/tests/framework/e2e/cluster.go @@ -32,6 +32,7 @@ import ( "go.uber.org/zap/zaptest" "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/api/v3/version" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/featuregate" "go.etcd.io/etcd/pkg/v3/proxy" @@ -630,6 +631,10 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in default: panic(fmt.Sprintf("Unknown cluster version %v", cfg.Version)) } + v, err := GetVersionFromBinary(execPath) + if err != nil { + panic(err) + } defaultValues := values(*embed.NewConfig()) overrideValues := values(cfg.ServerConfig) @@ -640,6 +645,12 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in if flag == "experimental-snapshot-catchup-entries" && !CouldSetSnapshotCatchupEntries(execPath) { continue } + if flag == "experimental-compaction-batch-limit" { + continue + } + if flag == "compaction-batch-limit" && v.LessThan(version.V3_6) { + flag = "experimental-compaction-batch-limit" + } args = append(args, fmt.Sprintf("--%s=%s", flag, value)) } envVars := map[string]string{}