go-pattern-examples/gomore/27_messages/message_test.go
2020-04-28 22:48:25 +08:00

16 lines
246 B
Go

package gomore
import "testing"
func TestMessageSubAndPub(t *testing.T) {
//创建一个队列
msgQueue := MesssageQueue{Topics: map[uint64]*Topic{}}
//创建一个话题
topic := Topic{}
//像队列订阅话题
topic.Subscribe(123)
}