From 4541c2296441ba7e7e625d95d45490dbd064c8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 9 Jun 2015 21:33:39 +0300 Subject: [PATCH] event/filter: hack around data race in the test --- event/filter/filter_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/event/filter/filter_test.go b/event/filter/filter_test.go index 815deb63a..534eb56d1 100644 --- a/event/filter/filter_test.go +++ b/event/filter/filter_test.go @@ -1,6 +1,9 @@ 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") }