Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

This commit is contained in:
wangchuxiao
2023-06-01 15:05:25 +08:00
2 changed files with 12 additions and 14 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ package controller
import (
"context"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"math/rand"
"strconv"
"sync"
@@ -186,9 +187,12 @@ func Test_Revoke(t *testing.T) {
}
func Test_FindBySeq(t *testing.T) {
if err := log.InitFromConfig("", 6, true, false, "", 2); err != nil {
t.Fatal(err)
}
db := GetDB()
ctx := context.Background()
fmt.Println(db.getMsgBySeqs(ctx, "100", "si_100_101", []int64{1}))
fmt.Println(db.msgDocDatabase.(*unrelation.MsgMongoDriver).GetMsgBySeqIndexIn1Doc(ctx, "100", "si_100_101:0", []int64{1}))
//res, err := db.msgDocDatabase.GetMsgBySeqIndexIn1Doc(ctx, "123456", "test:0", []int64{1, 2, 3})
//if err != nil {
// t.Fatal(err)