7 "github.com/go-kit/kit/log"
10 // These test are designed to be run with the race detector.
12 func testConcurrency(t *testing.T, logger log.Logger, total int) {
13 n := int(math.Sqrt(float64(total)))
16 errC := make(chan error, n)
18 for i := 0; i < n; i++ {
20 errC <- spam(logger, share)
24 for i := 0; i < n; i++ {
27 t.Fatalf("concurrent logging error: %v", err)
32 func spam(logger log.Logger, count int) error {
33 for i := 0; i < count; i++ {
34 err := logger.Log("key", i)