mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Move stopping proxy to after process stop to speed up cluster shutdown
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
2b45023364
commit
2fcb05710d
@ -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
|
||||
}
|
||||
|
||||
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user