Skip to content

Commit 910bf31

Browse files
wxiaoguangGiteaBot
andauthored
Fix flakey test in logger test (#24883)
Fix #24882 The goroutines are all asynchronized. So it needs a little "sleep" to make sure the writer's goroutine has been paused before sending messages to it. Co-authored-by: Giteabot <[email protected]>
1 parent a9d4173 commit 910bf31

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/log/logger_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func TestLoggerPause(t *testing.T) {
9494
logger.AddWriters(w1)
9595

9696
GetManager().PauseAll()
97+
time.Sleep(50 * time.Millisecond)
9798

9899
logger.Info("info-level")
99100
time.Sleep(100 * time.Millisecond)

0 commit comments

Comments
 (0)