(t *testing.T)
| 249 | } |
| 250 | |
| 251 | func TestSamplerRaces(t *testing.T) { |
| 252 | sampler, _ := fakeSampler(DebugLevel, time.Minute, 1, 1000) |
| 253 | |
| 254 | var wg sync.WaitGroup |
| 255 | start := make(chan struct{}) |
| 256 | |
| 257 | for i := 0; i < 100; i++ { |
| 258 | wg.Add(1) |
| 259 | go func() { |
| 260 | <-start |
| 261 | for j := 0; j < 100; j++ { |
| 262 | writeSequence(sampler, j, InfoLevel) |
| 263 | } |
| 264 | wg.Done() |
| 265 | }() |
| 266 | } |
| 267 | |
| 268 | close(start) |
| 269 | wg.Wait() |
| 270 | } |
| 271 | |
| 272 | func TestSamplerUnknownLevels(t *testing.T) { |
| 273 | // Prove that out-of-bounds levels don't panic. |
nothing calls this directly
no test coverage detected