提交 4541c229 编写于 作者: P Péter Szilágyi

event/filter: hack around data race in the test

上级 d652a58a
package filter
import "testing"
import (
"testing"
"time"
)
func TestFilters(t *testing.T) {
var success bool
......@@ -24,6 +27,8 @@ func TestFilters(t *testing.T) {
fm.Notify(Generic{Str1: "hello"}, true)
fm.Stop()
time.Sleep(10 * time.Millisecond) // yield to the notifier
if !success {
t.Error("expected 'hello' to be posted")
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册