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,13 +1,12 @@
package threading
import (
"io"
"log"
"sync"
"sync/atomic"
"testing"
"github.com/stretchr/testify/assert"
"github.com/zeromicro/go-zero/core/logx/logtest"
)
func TestRoutineGroupRun(t *testing.T) {
@@ -25,8 +24,7 @@ func TestRoutineGroupRun(t *testing.T) {
}
func TestRoutingGroupRunSafe(t *testing.T) {
log.SetOutput(io.Discard)
logtest.Discard(t)
var count int32
group := NewRoutineGroup()
var once sync.Once