mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 00:54:28 +00:00
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 <teabot@gitea.io>
This commit is contained in:
parent
a9d417341c
commit
910bf31546
@ -94,6 +94,7 @@ func TestLoggerPause(t *testing.T) {
|
|||||||
logger.AddWriters(w1)
|
logger.AddWriters(w1)
|
||||||
|
|
||||||
GetManager().PauseAll()
|
GetManager().PauseAll()
|
||||||
|
time.Sleep(50 * time.Millisecond)
|
||||||
|
|
||||||
logger.Info("info-level")
|
logger.Info("info-level")
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
Loading…
Reference in New Issue
Block a user