Fix/logx test log mismatchtime schedule num (#5305)

Co-authored-by: qiuwenhao <qiushaotest@qq.com>
This commit is contained in:
Qiu shao
2025-11-30 21:44:53 +08:00
committed by GitHub
parent fdf4ccf057
commit c6f75532fa
4 changed files with 6 additions and 15 deletions

View File

@@ -1,8 +1,6 @@
package fx
import (
"io"
"log"
"math/rand"
"reflect"
"runtime"
@@ -13,6 +11,7 @@ import (
"time"
"github.com/stretchr/testify/assert"
"github.com/zeromicro/go-zero/core/logx/logtest"
"github.com/zeromicro/go-zero/core/stringx"
"go.uber.org/goleak"
)
@@ -238,7 +237,7 @@ func TestLast(t *testing.T) {
func TestMap(t *testing.T) {
runCheckedTest(t, func(t *testing.T) {
log.SetOutput(io.Discard)
logtest.Discard(t)
tests := []struct {
mapper MapFunc