mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
refactor use defer
This commit is contained in:
parent
c88a556917
commit
52d5e05201
@ -19,6 +19,7 @@ func TestSimpleSnapshot(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal("start process failed:" + err.Error())
|
||||
}
|
||||
defer process.Kill()
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
||||
@ -84,6 +85,4 @@ func TestSimpleSnapshot(t *testing.T) {
|
||||
if snapshots[0].Name() != "0_1004.ss" {
|
||||
t.Fatal("wrong name of snapshot :[0_1004.ss/", snapshots[0].Name(), "]")
|
||||
}
|
||||
|
||||
process.Kill()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user