fix: correct token calculation error caused by ctxcache init (#559)

This commit is contained in:
lvxinyu-1117
2025-08-05 11:26:51 +08:00
committed by GitHub
parent f02c08c58b
commit 5dafd81a3f
4 changed files with 35 additions and 9 deletions

View File

@@ -32,6 +32,7 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/bytedance/mockey"
"github.com/cloudwego/eino/callbacks"
model2 "github.com/cloudwego/eino/components/model"
"github.com/cloudwego/eino/schema"
"github.com/cloudwego/hertz/pkg/app"
@@ -102,6 +103,11 @@ import (
"github.com/coze-dev/coze-studio/backend/types/errno"
)
func TestMain(m *testing.M) {
callbacks.AppendGlobalHandlers(service.GetTokenCallbackHandler())
os.Exit(m.Run())
}
type wfTestRunner struct {
t *testing.T
h *server.Hertz