You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
355 B
17 lines
355 B
package mq
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
"wss-pool/logging/applogger"
|
|
)
|
|
|
|
// TestPublish 测试发布消息到redis
|
|
func TestPublish(t *testing.T) {
|
|
msg := "当前时间: " + time.Now().Format("15:04:05")
|
|
applogger.Debug("[publish] msg: %s", msg)
|
|
err := Publish(PublishKey, msg)
|
|
if err != nil {
|
|
applogger.Error("publish error: %s", err.Error())
|
|
}
|
|
}
|
|
|