diff --git a/observer/observer_test.go b/observer/observer_test.go index d457759..b2ac1c6 100644 --- a/observer/observer_test.go +++ b/observer/observer_test.go @@ -3,6 +3,7 @@ package observer import ( "fmt" "testing" + "time" ) func TestObserver(t *testing.T) { @@ -28,4 +29,5 @@ func TestObserver(t *testing.T) { newUser2 := "gan" userRegister.Notify(newUser1) userRegister.Notify(newUser2) + time.Sleep(1 * time.Second) }