-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flakey test in logger test #24883
Conversation
Not a fan of sleep statements, but maybe make it 100ms like the other sleeps in the same function? |
That's the simplest way to test such behavior for a concurrent system. Otherwise, it needs a lot of code to break into the tested module, that would be unnecessarily complex. 10ms / 50ms / 100ms doesn't matter for a modern computer, in the queue test code , 50ms is often used. In this case, the "50ms" is for waiting for the logger gets paused, the "100ms" is for checking the logs, different values mean different purpose. Feel free to change it to a value you like. |
* main: Remove publish docs CI workflow (go-gitea#24889) Fix double border and adjust width for user profile page (go-gitea#24870) Support changing git config through `app.ini`, use `diff.algorithm=histogram` by default (go-gitea#24860) Fix flakey test in logger test (go-gitea#24883) Run stylelint on .vue files (go-gitea#24865) Update `CONTRIBUTING.md` (go-gitea#24492) Do not call nil handler for a dummy queue (go-gitea#24880) Remove unnecessary usage prefix from doc titles (go-gitea#24869) Add API for Label templates (go-gitea#24602) Fix install page context, make the install page tests really test (go-gitea#24858) Add validations.required check to dropdown field (go-gitea#24849)
* upstream/main: Fix `@font-face` overrides (go-gitea#24855) Fix logger refactoring regression: manager logging add (go-gitea#24847) Remove publish docs CI workflow (go-gitea#24889) Fix double border and adjust width for user profile page (go-gitea#24870) Support changing git config through `app.ini`, use `diff.algorithm=histogram` by default (go-gitea#24860) Fix flakey test in logger test (go-gitea#24883) Run stylelint on .vue files (go-gitea#24865) Update `CONTRIBUTING.md` (go-gitea#24492) Do not call nil handler for a dummy queue (go-gitea#24880) Remove unnecessary usage prefix from doc titles (go-gitea#24869) Add API for Label templates (go-gitea#24602) # Conflicts: # .stylelintrc.yaml # web_src/css/font_i18n.css
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.