@@ -376,10 +376,6 @@ func WithCompactionBatchLimit(limit int) EPClusterOption {
376
376
return func (c * EtcdProcessClusterConfig ) { c .ServerConfig .CompactionBatchLimit = limit }
377
377
}
378
378
379
- func WithExperimentalCompactionBatchLimit (limit int ) EPClusterOption {
380
- return func (c * EtcdProcessClusterConfig ) { c .ServerConfig .ExperimentalCompactionBatchLimit = limit }
381
- }
382
-
383
379
func WithCompactionSleepInterval (time time.Duration ) EPClusterOption {
384
380
return func (c * EtcdProcessClusterConfig ) { c .ServerConfig .ExperimentalCompactionSleepInterval = time }
385
381
}
@@ -640,6 +636,9 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
640
636
if flag == "experimental-snapshot-catchup-entries" && ! CouldSetSnapshotCatchupEntries (execPath ) {
641
637
continue
642
638
}
639
+ if flag == "compaction-batch-limit" {
640
+ flag = "experimental-compaction-batch-limit"
641
+ }
643
642
args = append (args , fmt .Sprintf ("--%s=%s" , flag , value ))
644
643
}
645
644
envVars := map [string ]string {}
@@ -881,16 +880,13 @@ func (epc *EtcdProcessCluster) StartNewProcFromConfig(ctx context.Context, tb te
881
880
882
881
// UpdateProcOptions updates the options for a specific process. If no opt is set, then the config is identical
883
882
// 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 {
885
884
if epc .Procs [i ].IsRunning () {
886
885
return fmt .Errorf ("process %d is still running, please close it before updating its options" , i )
887
886
}
888
887
cfg := * epc .Cfg
889
- for _ , opt := range opts {
890
- opt (& cfg )
891
- }
892
888
serverCfg := cfg .EtcdServerProcessConfig (tb , i )
893
-
889
+ serverCfg . Args = append ( serverCfg . Args , newflags ... )
894
890
var initialCluster []string
895
891
for _ , p := range epc .Procs {
896
892
initialCluster = append (initialCluster , fmt .Sprintf ("%s=%s" , p .Config ().Name , p .Config ().PeerURL .String ()))
0 commit comments