Skip to content

Commit

Permalink
Merge pull request #15091 from serathius/linearizability-stop-proxy
Browse files Browse the repository at this point in the history
tests: Move stopping proxy to after process stop to speed up cluster …
  • Loading branch information
serathius authored Jan 12, 2023
2 parents 7eb6f66 + 2fcb057 commit 715a004
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/framework/e2e/etcd_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ func (ep *EtcdServerProcess) Stop() (err error) {
}
}
ep.cfg.lg.Info("stopped server.", zap.String("name", ep.cfg.Name))
if ep.proxy != nil {
ep.cfg.lg.Info("stopping proxy...", zap.String("name", ep.cfg.Name))
err := ep.proxy.Close()
ep.proxy = nil
if err != nil {
return err
}
}
return nil
}

Expand All @@ -198,14 +206,6 @@ func (ep *EtcdServerProcess) Close() error {
if err := ep.Stop(); err != nil {
return err
}
if ep.proxy != nil {
ep.cfg.lg.Info("closing proxy...", zap.String("name", ep.cfg.Name))
err := ep.proxy.Close()
if err != nil {
return err
}
ep.proxy = nil
}

if !ep.cfg.KeepDataDir {
ep.cfg.lg.Info("removing directory", zap.String("data-dir", ep.cfg.DataDirPath))
Expand Down

0 comments on commit 715a004

Please sign in to comment.