@@ -633,26 +633,13 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
633
633
args = append (args , "--discovery=" + cfg .Discovery )
634
634
}
635
635
636
- var execPath string
637
- switch cfg .Version {
638
- case CurrentVersion :
639
- execPath = BinPath .Etcd
640
- case MinorityLastVersion :
641
- if i <= cfg .ClusterSize / 2 {
642
- execPath = BinPath .Etcd
643
- } else {
644
- execPath = BinPath .EtcdLastRelease
645
- }
646
- case QuorumLastVersion :
647
- if i <= cfg .ClusterSize / 2 {
648
- execPath = BinPath .EtcdLastRelease
649
- } else {
650
- execPath = BinPath .Etcd
651
- }
652
- case LastVersion :
653
- execPath = BinPath .EtcdLastRelease
654
- default :
655
- panic (fmt .Sprintf ("Unknown cluster version %v" , cfg .Version ))
636
+ execPath := cfg .binaryPath (i )
637
+
638
+ if cfg .ServerConfig .SnapshotCatchUpEntries != etcdserver .DefaultSnapshotCatchUpEntries {
639
+ /*if !IsSnapshotCatchupEntriesFlagAvailable(execPath) {
640
+ cfg.ServerConfig.ExperimentalSnapshotCatchUpEntries = cfg.ServerConfig.SnapshotCatchUpEntries
641
+ cfg.ServerConfig.SnapshotCatchUpEntries = etcdserver.DefaultSnapshotCatchUpEntries
642
+ } */
656
643
}
657
644
658
645
defaultValues := values (* embed .NewConfig ())
@@ -696,6 +683,32 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
696
683
}
697
684
}
698
685
686
+ func (cfg * EtcdProcessClusterConfig ) binaryPath (i int ) string {
687
+ var execPath string
688
+ switch cfg .Version {
689
+ case CurrentVersion :
690
+ execPath = BinPath .Etcd
691
+ case MinorityLastVersion :
692
+ if i <= cfg .ClusterSize / 2 {
693
+ execPath = BinPath .Etcd
694
+ } else {
695
+ execPath = BinPath .EtcdLastRelease
696
+ }
697
+ case QuorumLastVersion :
698
+ if i <= cfg .ClusterSize / 2 {
699
+ execPath = BinPath .EtcdLastRelease
700
+ } else {
701
+ execPath = BinPath .Etcd
702
+ }
703
+ case LastVersion :
704
+ execPath = BinPath .EtcdLastRelease
705
+ default :
706
+ panic (fmt .Sprintf ("Unknown cluster version %v" , cfg .Version ))
707
+ }
708
+
709
+ return execPath
710
+ }
711
+
699
712
func values (cfg embed.Config ) map [string ]string {
700
713
fs := flag .NewFlagSet ("etcd" , flag .ContinueOnError )
701
714
cfg .AddFlags (fs )
0 commit comments