(t *testing.T)
| 289 | } |
| 290 | |
| 291 | func TestEntryFormatterRace(t *testing.T) { |
| 292 | logger := New() |
| 293 | entry := NewEntry(logger) |
| 294 | |
| 295 | // logging before SetReportCaller has the highest chance of causing a race condition |
| 296 | // to be detected, but doing it twice just to increase the likelihood of detecting the race |
| 297 | go func() { |
| 298 | entry.Info("should not race") |
| 299 | }() |
| 300 | go func() { |
| 301 | logger.SetFormatter(&TextFormatter{}) |
| 302 | }() |
| 303 | go func() { |
| 304 | entry.Info("should not race") |
| 305 | }() |
| 306 | } |
nothing calls this directly
no test coverage detected