mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 08:29:58 +08:00
Fix/logx test log mismatchtime schedule num (#5305)
Co-authored-by: qiuwenhao <qiushaotest@qq.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -3,13 +3,12 @@ package threading
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/zeromicro/go-zero/core/lang"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/core/logx/logtest"
|
||||
)
|
||||
|
||||
func TestRoutineId(t *testing.T) {
|
||||
@@ -17,7 +16,7 @@ func TestRoutineId(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRunSafe(t *testing.T) {
|
||||
log.SetOutput(io.Discard)
|
||||
logtest.Discard(t)
|
||||
|
||||
i := 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user