修正扇出的测试用例会出现的问题
This commit is contained in:
parent
ad8459af83
commit
a61d49c8c3
@ -3,6 +3,7 @@ package observer
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestObserver(t *testing.T) {
|
func TestObserver(t *testing.T) {
|
||||||
@ -28,4 +29,5 @@ func TestObserver(t *testing.T) {
|
|||||||
newUser2 := "gan"
|
newUser2 := "gan"
|
||||||
userRegister.Notify(newUser1)
|
userRegister.Notify(newUser1)
|
||||||
userRegister.Notify(newUser2)
|
userRegister.Notify(newUser2)
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user