From 8369e2f077642788e2ef31f342a0a4621b2b4607 Mon Sep 17 00:00:00 2001 From: David Bariod Date: Sat, 12 May 2018 15:51:19 +0200 Subject: [PATCH] Fix a race condition in TestLoggingWithHooksRace --- hooks/test/test_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/test/test_test.go b/hooks/test/test_test.go index dea768e..742be55 100644 --- a/hooks/test/test_test.go +++ b/hooks/test/test_test.go @@ -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)) }