replication master side

This commit is contained in:
finley
2022-11-21 23:36:35 +08:00
parent a7a3da6e49
commit ba7ea942cb
23 changed files with 886 additions and 217 deletions

View File

@@ -13,7 +13,7 @@ func TestPublish(t *testing.T) {
hub := pubsub.MakeHub()
channel := utils.RandString(5)
msg := utils.RandString(5)
conn := &connection.FakeConn{}
conn := connection.NewFakeConn()
pubsub.Subscribe(hub, conn, utils.ToCmdLine(channel))
conn.Clean() // clean subscribe success
pubsub.Publish(hub, utils.ToCmdLine(channel, msg))