|
|
|
@ -18,18 +18,18 @@ maxRetry: 10
|
|
|
|
|
*/
|
|
|
|
|
func TestName111111(t *testing.T) {
|
|
|
|
|
conf := config.Redis{
|
|
|
|
|
//Address: []string{
|
|
|
|
|
// "172.16.8.48:7001",
|
|
|
|
|
// "172.16.8.48:7002",
|
|
|
|
|
// "172.16.8.48:7003",
|
|
|
|
|
// "172.16.8.48:7004",
|
|
|
|
|
// "172.16.8.48:7005",
|
|
|
|
|
// "172.16.8.48:7006",
|
|
|
|
|
//},
|
|
|
|
|
//ClusterMode: true,
|
|
|
|
|
//Password: "passwd123",
|
|
|
|
|
Address: []string{"localhost:16379"},
|
|
|
|
|
Password: "openIM123",
|
|
|
|
|
Address: []string{
|
|
|
|
|
"172.16.8.124:7001",
|
|
|
|
|
"172.16.8.124:7002",
|
|
|
|
|
"172.16.8.124:7003",
|
|
|
|
|
"172.16.8.124:7004",
|
|
|
|
|
"172.16.8.124:7005",
|
|
|
|
|
"172.16.8.124:7006",
|
|
|
|
|
},
|
|
|
|
|
ClusterMode: true,
|
|
|
|
|
Password: "passwd123",
|
|
|
|
|
//Address: []string{"localhost:16379"},
|
|
|
|
|
//Password: "openIM123",
|
|
|
|
|
}
|
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), time.Second*1000)
|
|
|
|
|
defer cancel()
|
|
|
|
@ -39,7 +39,7 @@ func TestName111111(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
online := NewUserOnline(rdb)
|
|
|
|
|
|
|
|
|
|
userID := "123456"
|
|
|
|
|
userID := "a123456"
|
|
|
|
|
t.Log(online.GetOnline(ctx, userID))
|
|
|
|
|
t.Log(online.SetUserOnline(ctx, userID, []int32{1, 2, 3, 4}, nil))
|
|
|
|
|
t.Log(online.GetOnline(ctx, userID))
|
|
|
|
|