Run tests with -race

This commit is contained in:
Ronny López
2016-01-23 10:54:36 +01:00
parent f7f79f729e
commit 6094714616
2 changed files with 17 additions and 0 deletions
+15
View File
@@ -299,3 +299,18 @@ func TestGetSetLevelRace(t *testing.T) {
}
wg.Wait()
}
func TestLoggingRace(t *testing.T) {
logger := New()
var wg sync.WaitGroup
wg.Add(100)
for i := 0; i < 100; i++ {
go func() {
logger.Info("info")
wg.Done()
}()
}
wg.Wait()
}