mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: add checking snapshot be sent in mix_version_test.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
This commit is contained in:
@@ -158,7 +158,8 @@ type EtcdProcessClusterConfig struct {
|
||||
|
||||
MetricsURLScheme string
|
||||
|
||||
SnapshotCount int // default is 10000
|
||||
SnapshotCount int // default is 10000
|
||||
SnapshotCatchUpEntries int // default is 5000
|
||||
|
||||
ClientTLS ClientConnType
|
||||
ClientCertAuthEnabled bool
|
||||
@@ -402,6 +403,12 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
|
||||
panic(fmt.Sprintf("Unknown cluster version %v", cfg.Version))
|
||||
}
|
||||
|
||||
// the "--experimental-snapshot-catchup-entries" flag is not available in 3.4.
|
||||
// so it should not be set if the process execPath is not BinPath.
|
||||
if cfg.SnapshotCatchUpEntries > 0 && execPath == BinPath {
|
||||
args = append(args, "--experimental-snapshot-catchup-entries", fmt.Sprintf("%d", cfg.SnapshotCatchUpEntries))
|
||||
}
|
||||
|
||||
return &EtcdServerProcessConfig{
|
||||
lg: cfg.Logger,
|
||||
ExecPath: execPath,
|
||||
|
||||
Reference in New Issue
Block a user