Skip to content

Commit

Permalink
Merge pull request #19348 from gangli113/downgradetest
Browse files Browse the repository at this point in the history
increase timeout for MemberDowngradeUpgrade test
  • Loading branch information
ahrtr authored Feb 6, 2025
2 parents c6b9e9e + 3b3243b commit f1d09c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/robustness/failpoint/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ func (f memberDowngradeUpgrade) Available(config e2e.EtcdProcessClusterConfig, m
return v.Compare(v3_6) >= 0 && (config.Version == e2e.CurrentVersion && member.Config().ExecPath == e2e.BinPath.Etcd)
}

func (f memberDowngradeUpgrade) Timeout() time.Duration {
return 120 * time.Second
}

func getID(ctx context.Context, cc *clientv3.Client, name string) (id uint64, found bool, err error) {
// Ensure linearized MemberList by first making a linearized Get request from the same member.
// This is required for v3.4 support as it doesn't support linearized MemberList https://github.com/etcd-io/etcd/issues/18929
Expand Down
10 changes: 9 additions & 1 deletion tests/robustness/failpoint/failpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ func Validate(clus *e2e.EtcdProcessCluster, failpoint Failpoint, profile traffic
}

func Inject(ctx context.Context, t *testing.T, lg *zap.Logger, clus *e2e.EtcdProcessCluster, failpoint Failpoint, baseTime time.Time, ids identity.Provider) (*report.FailpointReport, error) {
ctx, cancel := context.WithTimeout(ctx, triggerTimeout)
timeout := triggerTimeout
if timeoutObj, ok := failpoint.(TimeoutInterface); ok {
timeout = timeoutObj.Timeout()
}
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
var err error

Expand Down Expand Up @@ -147,3 +151,7 @@ type Failpoint interface {
type AvailabilityChecker interface {
Available(e2e.EtcdProcessClusterConfig, e2e.EtcdProcess, traffic.Profile) bool
}

type TimeoutInterface interface {
Timeout() time.Duration
}

0 comments on commit f1d09c0

Please sign in to comment.