From a61d49c8c32ac204285f9b0605ec42b890e95107 Mon Sep 17 00:00:00 2001 From: fantasticbin Date: Fri, 15 Nov 2024 23:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=89=87=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- observer/observer_test.go | 2 ++ 1 file changed, 2 insertions(+) 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) }