mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 03:42:08 +08:00
refactor: delete message and message batch use lua.
This commit is contained in:
parent
268b6136e7
commit
7979d3c258
6
pkg/common/storage/cache/redis/msg_test.go
vendored
6
pkg/common/storage/cache/redis/msg_test.go
vendored
@ -38,7 +38,7 @@ func Test_msgCache_SetMessagesToCache(t *testing.T) {
|
|||||||
want int
|
want int
|
||||||
wantErr assert.ErrorAssertionFunc
|
wantErr assert.ErrorAssertionFunc
|
||||||
}{
|
}{
|
||||||
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379"})}, args{context.Background(),
|
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379", Password: "openIM23"})}, args{context.Background(),
|
||||||
"cid", []*sdkws.MsgData{{Seq: 1}, {Seq: 2}, {Seq: 3}}}, 3, assert.NoError},
|
"cid", []*sdkws.MsgData{{Seq: 1}, {Seq: 2}, {Seq: 3}}}, 3, assert.NoError},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
@ -72,7 +72,7 @@ func Test_msgCache_GetMessagesBySeq(t *testing.T) {
|
|||||||
wantFailedSeqs []int64
|
wantFailedSeqs []int64
|
||||||
wantErr assert.ErrorAssertionFunc
|
wantErr assert.ErrorAssertionFunc
|
||||||
}{
|
}{
|
||||||
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379"})},
|
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379", Password: "openIM23"})},
|
||||||
args{context.Background(), "cid", []int64{1, 2, 3}},
|
args{context.Background(), "cid", []int64{1, 2, 3}},
|
||||||
[]*sdkws.MsgData{{Seq: 1}, {Seq: 2}, {Seq: 3}}, []int64{}, assert.NoError},
|
[]*sdkws.MsgData{{Seq: 1}, {Seq: 2}, {Seq: 3}}, []int64{}, assert.NoError},
|
||||||
{"test2", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379"})},
|
{"test2", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379"})},
|
||||||
@ -109,7 +109,7 @@ func Test_msgCache_DeleteMessagesFromCache(t *testing.T) {
|
|||||||
args args
|
args args
|
||||||
wantErr assert.ErrorAssertionFunc
|
wantErr assert.ErrorAssertionFunc
|
||||||
}{
|
}{
|
||||||
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379"})},
|
{"test1", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379", Password: "openIM23"})},
|
||||||
args{context.Background(), "cid", []int64{1, 2, 3}}, assert.NoError},
|
args{context.Background(), "cid", []int64{1, 2, 3}}, assert.NoError},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user