diff --git a/pkg/lru/woker_test.go b/pkg/lru/woker_test.go index ef1a757..77a6ad8 100644 --- a/pkg/lru/woker_test.go +++ b/pkg/lru/woker_test.go @@ -3,6 +3,7 @@ package lru import ( "context" "gitee.com/timedb/wheatCache/pkg/event" + "gitee.com/timedb/wheatCache/pkg/proto" "gitee.com/timedb/wheatCache/pkg/structure/stringx" "github.com/stretchr/testify/require" "testing" @@ -16,9 +17,11 @@ func TestWorker(t *testing.T) { workEvent := event.NewEvent(OptionEventName) workEvent.SetValue(WorkFuncEventKey, event.EventWorkFunc(func() (interface{}, error) { v1 := stringx.NewStringSingle() - key := "v1" + key := proto.BaseKey{ + Key: "v1", + } res, _ := v1.Set("123") - lru.Add(key, v1) + lru.Add(&key, v1) return res, nil })) workEvent.InitWaitEvent()