@@ -376,10 +376,6 @@ func WithCompactionBatchLimit(limit int) EPClusterOption {
376376 return func (c * EtcdProcessClusterConfig ) { c .ServerConfig .CompactionBatchLimit = limit }
377377}
378378
379- func WithExperimentalCompactionBatchLimit (limit int ) EPClusterOption {
380- return func (c * EtcdProcessClusterConfig ) { c .ServerConfig .ExperimentalCompactionBatchLimit = limit }
381- }
382-
383379func WithCompactionSleepInterval (time time.Duration ) EPClusterOption {
384380 return func (c * EtcdProcessClusterConfig ) { c .ServerConfig .ExperimentalCompactionSleepInterval = time }
385381}
@@ -640,6 +636,9 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
640636 if flag == "experimental-snapshot-catchup-entries" && ! CouldSetSnapshotCatchupEntries (execPath ) {
641637 continue
642638 }
639+ if flag == "compaction-batch-limit" {
640+ flag = "experimental-compaction-batch-limit"
641+ }
643642 args = append (args , fmt .Sprintf ("--%s=%s" , flag , value ))
644643 }
645644 envVars := map [string ]string {}
@@ -881,16 +880,13 @@ func (epc *EtcdProcessCluster) StartNewProcFromConfig(ctx context.Context, tb te
881880
882881// UpdateProcOptions updates the options for a specific process. If no opt is set, then the config is identical
883882// to the cluster.
884- func (epc * EtcdProcessCluster ) UpdateProcOptions (i int , tb testing.TB , opts ... EPClusterOption ) error {
883+ func (epc * EtcdProcessCluster ) UpdateProcOptions (i int , tb testing.TB , newflags ... string ) error {
885884 if epc .Procs [i ].IsRunning () {
886885 return fmt .Errorf ("process %d is still running, please close it before updating its options" , i )
887886 }
888887 cfg := * epc .Cfg
889- for _ , opt := range opts {
890- opt (& cfg )
891- }
892888 serverCfg := cfg .EtcdServerProcessConfig (tb , i )
893-
889+ serverCfg . Args = append ( serverCfg . Args , newflags ... )
894890 var initialCluster []string
895891 for _ , p := range epc .Procs {
896892 initialCluster = append (initialCluster , fmt .Sprintf ("%s=%s" , p .Config ().Name , p .Config ().PeerURL .String ()))
0 commit comments