-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
testing: Tests timeout with Go 1.20.x, but pass with Go 1.19 and 1.18 in ~20 seconds. #58867
Comments
The code seems to be riddled with data races, see |
Hi @fzipp yes it looks like that, but that never failed the tests since go 1.15. I tried to find the commit that broke the tests by Fixing the race conditions is an open PR in my library, but also the biggest refactor we ever had (and most likely a breaking change). So we have to be very careful with it. My current workaround is to use Go 1.19 in the pipeline, but that shouldn't be a requirement to run our tests. Do you have any idea how I could instruct Go 1.20 to work with the tests? Or maybe a hint what change in Go broke this? |
I use go1.20.1 to run Go1.20 New fields for exec.Cmd |
If the code has data races, then we aren't going to investigate why the behavior has changed. Sorry. If someone wants to take a look please go ahead, but we're unlikely to make any changes to the Go tools because of racy code. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
My package tests pass on go 1.19 and below, but not on Go 1.20.x.
When I run the tests with go 1.19 they pass in 19 seconds. When I do the same with Go > 1.20 they fail on a timeout after 11 minutes. I have verified this behavior on multiple systems and operating systems (pipeline matrix test and local).
I used
-v -p 1
as tests flags, and it seems like random tests are hanging.I have also verified that the tests pass on Go 1.18.
Pipeline runs
Passed tests (go 1.19): https://github.com/pterm/pterm/actions/runs/4332770035/jobs/7565480959
Failed tests (go 1.20.1): https://github.com/pterm/pterm/actions/runs/4332579616/jobs/7565164242
What did you expect to see?
Tests passing
What did you see instead?
Test failing
The text was updated successfully, but these errors were encountered: