Skip to content

Commit

Permalink
fix logs_test UT error
Browse files Browse the repository at this point in the history
  • Loading branch information
studyzy committed Jan 24, 2025
1 parent 76bb885 commit cd155d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/logx/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ func TestStructedLogDebugfn(t *testing.T) {
func TestDebugfnWithInfoLevel(t *testing.T) {
called := false
SetLevel(InfoLevel)
defer SetLevel(DebugLevel)
Debugfn(func() string {
called = true
return "long time log"
Expand Down Expand Up @@ -482,6 +483,7 @@ func TestStructedInfofn(t *testing.T) {
func TestInfofnWithErrorLevel(t *testing.T) {
called := false
SetLevel(ErrorLevel)
defer SetLevel(DebugLevel)
Infofn(func() string {
called = true
return "info log"
Expand Down

0 comments on commit cd155d9

Please sign in to comment.