mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +08:00
refactor: delete message and message batch use lua.
This commit is contained in:
parent
9bcda48152
commit
46878a6251
71
pkg/common/storage/cache/redis/msg_test.go
vendored
71
pkg/common/storage/cache/redis/msg_test.go
vendored
@ -39,76 +39,7 @@ func Test_msgCache_SetMessagesToCache(t *testing.T) {
|
|||||||
wantErr assert.ErrorAssertionFunc
|
wantErr assert.ErrorAssertionFunc
|
||||||
}{
|
}{
|
||||||
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379", Username: "", Password: "openIM123", DB: 0})}, args{context.Background(),
|
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379", Username: "", Password: "openIM123", DB: 0})}, args{context.Background(),
|
||||||
"cid", []*sdkws.MsgData{{
|
"cid", []*sdkws.MsgData{{Seq: 1}, {Seq: 2}, {Seq: 3}}}, 3, assert.NoError},
|
||||||
SendID: "1",
|
|
||||||
RecvID: "2",
|
|
||||||
GroupID: "3",
|
|
||||||
ClientMsgID: "sdfsdf",
|
|
||||||
ServerMsgID: "234234",
|
|
||||||
SenderPlatformID: 0,
|
|
||||||
SenderNickname: "",
|
|
||||||
SenderFaceURL: "",
|
|
||||||
SessionType: 0,
|
|
||||||
MsgFrom: 0,
|
|
||||||
ContentType: 0,
|
|
||||||
Content: nil,
|
|
||||||
Seq: 1,
|
|
||||||
SendTime: 0,
|
|
||||||
CreateTime: 0,
|
|
||||||
Status: 0,
|
|
||||||
IsRead: false,
|
|
||||||
Options: nil,
|
|
||||||
OfflinePushInfo: nil,
|
|
||||||
AtUserIDList: nil,
|
|
||||||
AttachedInfo: "",
|
|
||||||
Ex: "",
|
|
||||||
}, {
|
|
||||||
SendID: "2",
|
|
||||||
RecvID: "3",
|
|
||||||
GroupID: "4",
|
|
||||||
ClientMsgID: "sdfsdfsd",
|
|
||||||
ServerMsgID: "sdfsdf",
|
|
||||||
SenderPlatformID: 0,
|
|
||||||
SenderNickname: "",
|
|
||||||
SenderFaceURL: "",
|
|
||||||
SessionType: 0,
|
|
||||||
MsgFrom: 0,
|
|
||||||
ContentType: 0,
|
|
||||||
Content: nil,
|
|
||||||
Seq: 2,
|
|
||||||
SendTime: 0,
|
|
||||||
CreateTime: 0,
|
|
||||||
Status: 0,
|
|
||||||
IsRead: false,
|
|
||||||
Options: nil,
|
|
||||||
OfflinePushInfo: nil,
|
|
||||||
AtUserIDList: nil,
|
|
||||||
AttachedInfo: "",
|
|
||||||
Ex: "",
|
|
||||||
}, {
|
|
||||||
SendID: "5",
|
|
||||||
RecvID: "6",
|
|
||||||
GroupID: "7",
|
|
||||||
ClientMsgID: "sdfd",
|
|
||||||
ServerMsgID: "sdfsdf",
|
|
||||||
SenderPlatformID: 0,
|
|
||||||
SenderNickname: "",
|
|
||||||
SenderFaceURL: "",
|
|
||||||
SessionType: 0,
|
|
||||||
MsgFrom: 0,
|
|
||||||
ContentType: 0,
|
|
||||||
Content: nil,
|
|
||||||
Seq: 3,
|
|
||||||
SendTime: 0,
|
|
||||||
CreateTime: 0,
|
|
||||||
Status: 0,
|
|
||||||
IsRead: false,
|
|
||||||
Options: nil,
|
|
||||||
OfflinePushInfo: nil,
|
|
||||||
AtUserIDList: nil,
|
|
||||||
AttachedInfo: "",
|
|
||||||
Ex: "",
|
|
||||||
}}}, 3, assert.NoError},
|
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user