Commit f4054b69 authored by Matt Holt's avatar Matt Holt

Merge pull request #241 from LK4D4/fix_race_test

markdown: Use less strict condition to avoid problems with concurrency
parents 287543a0 faaef839
......@@ -17,10 +17,11 @@ func TestWatcher(t *testing.T) {
i++
out += fmt.Sprint(i)
})
time.Sleep(interval * 8)
// wait little more because of concurrency
time.Sleep(interval * 9)
stopChan <- struct{}{}
if expected != out {
t.Fatalf("Expected %v, found %v", expected, out)
if !strings.HasPrefix(out, expected) {
t.Fatalf("Expected to have prefix %v, found %v", expected, out)
}
out = ""
i = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment