Skip to content

Commit

Permalink
event/filter: hack around data race in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe committed Jun 9, 2015
1 parent d652a58 commit 4541c22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion event/filter/filter_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package filter

import "testing"
import (
"testing"
"time"
)

func TestFilters(t *testing.T) {
var success bool
Expand All @@ -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")
}
Expand Down

0 comments on commit 4541c22

Please sign in to comment.