修复test报错

This commit is contained in:
bjdgyc
2023-04-25 21:48:54 +08:00
parent b52b8598df
commit b81bc5c283
4 changed files with 21 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ package sessdata
import (
"fmt"
"testing"
"time"
"github.com/bjdgyc/anylink/base"
"github.com/stretchr/testify/assert"
@@ -24,11 +25,15 @@ func TestConnSession(t *testing.T) {
preData(tmp)
defer cleardata(tmp)
time.Sleep(time.Second * 10)
sess := NewSession("")
sess.Username = "user-test"
sess.Group = "group1"
sess.MacAddr = "00:15:5d:50:14:43"
cSess := sess.NewConn()
base.Info("cSess", cSess)
err := cSess.RateLimit(100, true)
ast.Nil(err)