mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
e2e tests were leaking 'defunc' etcdctl processes.
The commit ensures that spawned etcdctl processes are "closed", so they perform proper os wait processing. This might have contributed to file-descriptor/open-files limit being exceeded.
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
)
|
||||
|
||||
func AssertEqual(t *testing.T, e, a interface{}, msg ...string) {
|
||||
t.Helper()
|
||||
if (e == nil || a == nil) && (isNil(e) && isNil(a)) {
|
||||
return
|
||||
}
|
||||
@@ -36,20 +37,24 @@ func AssertEqual(t *testing.T, e, a interface{}, msg ...string) {
|
||||
}
|
||||
|
||||
func AssertNil(t *testing.T, v interface{}) {
|
||||
t.Helper()
|
||||
AssertEqual(t, nil, v)
|
||||
}
|
||||
|
||||
func AssertNotNil(t *testing.T, v interface{}) {
|
||||
t.Helper()
|
||||
if v == nil {
|
||||
t.Fatalf("expected non-nil, got %+v", v)
|
||||
}
|
||||
}
|
||||
|
||||
func AssertTrue(t *testing.T, v bool, msg ...string) {
|
||||
t.Helper()
|
||||
AssertEqual(t, true, v, msg...)
|
||||
}
|
||||
|
||||
func AssertFalse(t *testing.T, v bool, msg ...string) {
|
||||
t.Helper()
|
||||
AssertEqual(t, false, v, msg...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user