Fix a race condition in TestLoggingWithHooksRace

This commit is contained in:
David Bariod 2018-05-12 15:51:19 +02:00
parent 778f2e774c
commit 8369e2f077
1 changed files with 2 additions and 2 deletions

View File

@ -51,11 +51,11 @@ func TestLoggingWithHooksRace(t *testing.T) {
}()
}
wg.Wait()
assert.Equal(logrus.InfoLevel, hook.LastEntry().Level)
assert.Equal("info", hook.LastEntry().Message)
wg.Wait()
entries := hook.AllEntries()
assert.Equal(100, len(entries))
}