forked from mirror/logrus
Fix a race condition in TestLoggingWithHooksRace
This commit is contained in:
parent
778f2e774c
commit
8369e2f077
|
@ -51,11 +51,11 @@ func TestLoggingWithHooksRace(t *testing.T) {
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
assert.Equal(logrus.InfoLevel, hook.LastEntry().Level)
|
assert.Equal(logrus.InfoLevel, hook.LastEntry().Level)
|
||||||
assert.Equal("info", hook.LastEntry().Message)
|
assert.Equal("info", hook.LastEntry().Message)
|
||||||
|
|
||||||
wg.Wait()
|
|
||||||
|
|
||||||
entries := hook.AllEntries()
|
entries := hook.AllEntries()
|
||||||
assert.Equal(100, len(entries))
|
assert.Equal(100, len(entries))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue