Skip to content

Commit

Permalink
Merge pull request #19160 from siyuanfoundation/downgrade-robust-1
Browse files Browse the repository at this point in the history
robustness: only run MemberDowngrade test for high SnapshotCatchUpEntries
  • Loading branch information
serathius authored Jan 10, 2025
2 parents 0edc5c0 + 08e4d6d commit a228c12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/robustness/failpoint/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ func (f memberDowngrade) Available(config e2e.EtcdProcessClusterConfig, member e
if !fileutil.Exist(e2e.BinPath.EtcdLastRelease) {
return false
}
// only run memberDowngrade test if no snapshot would be sent between members.
// see https://github.com/etcd-io/etcd/issues/19147 for context.
if config.ServerConfig.SnapshotCatchUpEntries < etcdserver.DefaultSnapshotCatchUpEntries {
return false
}
v, err := e2e.GetVersionFromBinary(e2e.BinPath.Etcd)
if err != nil {
panic("Failed checking etcd version binary")
Expand Down
3 changes: 2 additions & 1 deletion tests/robustness/scenarios/scenarios.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"go.etcd.io/etcd/api/v3/version"
"go.etcd.io/etcd/client/pkg/v3/fileutil"
"go.etcd.io/etcd/server/v3/etcdserver"
"go.etcd.io/etcd/tests/v3/framework/e2e"
"go.etcd.io/etcd/tests/v3/robustness/client"
"go.etcd.io/etcd/tests/v3/robustness/failpoint"
Expand Down Expand Up @@ -101,7 +102,7 @@ func Exploratory(_ *testing.T) []TestScenario {
}

if e2e.CouldSetSnapshotCatchupEntries(e2e.BinPath.Etcd) {
baseOptions = append(baseOptions, e2e.WithSnapshotCatchUpEntries(100))
baseOptions = append(baseOptions, options.WithSnapshotCatchUpEntries(100, etcdserver.DefaultSnapshotCatchUpEntries))
}
scenarios := []TestScenario{}
for _, tp := range trafficProfiles {
Expand Down

0 comments on commit a228c12

Please sign in to comment.