Codebase list golang-github-go-kit-kit / 8f0ecd3
More flaky Travis fixing Peter Bourgon 9 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
55 "bytes"
66 "fmt"
77 "runtime"
8 "strings"
89 "testing"
910 "time"
1011 )
9091 execute := func() { ch <- time.Now(); runtime.Gosched(); time.Sleep(5 * time.Millisecond) }
9192 by(t, time.Second, check, execute, "buffer never got write+flush")
9293
93 if want, have := fmt.Sprintf("test_statsd_callback_gauge:%f|g\n", value), buf.String(); want != have {
94 if want, have := fmt.Sprintf("test_statsd_callback_gauge:%f|g\n", value), buf.String(); !strings.HasPrefix(have, want) {
9495 t.Errorf("want %q, have %q", want, have)
9596 }
9697 }