Fix a double lock in test/utils

Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
Ziheng Liu 2019-10-28 20:18:19 -04:00
parent b6c8f4916d
commit a17925425f

View File

@ -95,8 +95,6 @@ func (a *AuditTestServer) WaitForEvents(expected []AuditEvent) ([]AuditEvent, er
var missing []AuditEvent
err := wait.PollImmediate(50*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) {
var err error
a.LockedEventList.RLock()
defer a.LockedEventList.RUnlock()
el := a.GetEventList()
if len(el.Items) < 1 {
return false, nil