You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
577 B

package service
import (
"context"
"github.com/TremblingV5/DouTok/kitex_gen/relation"
"github.com/cloudwego/hertz/pkg/common/test/assert"
"testing"
"time"
)
func TestConsumeMsg(t *testing.T) {
Init()
go ConsumeMsg()
time.Sleep(time.Second * 3)
}
func TestFlush(t *testing.T) {
Init()
relService := NewRelationActionService(context.Background())
req := &relation.DouyinRelationActionRequest{
UserId: 10001000,
ToUserId: 10002000,
ActionType: 1,
}
err := relService.RelationAction(req)
assert.Nil(t, err)
go Flush()
time.Sleep(time.Second * 3)
}