mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6564 from gyuho/nil-ref
e2e: skip when 'etcdProcess' is nil
This commit is contained in:
commit
02912fe8c4
@ -424,6 +424,11 @@ func (epc *etcdProcessCluster) StopAll() (err error) {
|
||||
func (epc *etcdProcessCluster) Close() error {
|
||||
err := epc.StopAll()
|
||||
for _, p := range epc.procs {
|
||||
// p is nil when newEtcdProcess fails in the middle
|
||||
// Close still gets called to clean up test data
|
||||
if p == nil {
|
||||
continue
|
||||
}
|
||||
os.RemoveAll(p.cfg.dataDirPath)
|
||||
}
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user