From 7979d3c2589ca7f395d44f75c755ae3d9f33d6ea Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Fri, 31 May 2024 18:02:27 +0800 Subject: [PATCH] refactor: delete message and message batch use lua. --- pkg/common/storage/cache/redis/msg_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/common/storage/cache/redis/msg_test.go b/pkg/common/storage/cache/redis/msg_test.go index bd723c7cb..7b8e0d787 100644 --- a/pkg/common/storage/cache/redis/msg_test.go +++ b/pkg/common/storage/cache/redis/msg_test.go @@ -38,7 +38,7 @@ func Test_msgCache_SetMessagesToCache(t *testing.T) { want int 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}, } for _, tt := range tests { @@ -72,7 +72,7 @@ func Test_msgCache_GetMessagesBySeq(t *testing.T) { wantFailedSeqs []int64 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}}, []*sdkws.MsgData{{Seq: 1}, {Seq: 2}, {Seq: 3}}, []int64{}, assert.NoError}, {"test2", fields{rdb: redis.NewClient(&redis.Options{Addr: "localhost:16379"})}, @@ -109,7 +109,7 @@ func Test_msgCache_DeleteMessagesFromCache(t *testing.T) { args args 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}, } for _, tt := range tests {