|
@@ -140,3 +140,11 @@ func TestGroupStreamClose(t *testing.T) {
|
|
|
add()
|
|
|
time.Sleep(time.Second * 10)
|
|
|
}
|
|
|
+
|
|
|
+func TestGroupBroadcast(t *testing.T) {
|
|
|
+ group := NewStreamGroup(context.Background())
|
|
|
+ group.Store("1", NewTestStream())
|
|
|
+ group.Store("12", NewTestStream())
|
|
|
+ group.EventBroadcast(NewTestRequestOut())
|
|
|
+ time.Sleep(time.Second * 10)
|
|
|
+}
|