-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[chore]: fix go routine leaks in tests #34729
base: main
Are you sure you want to change the base?
Conversation
3630789
to
55b3d96
Compare
41af7c9
to
4d33a21
Compare
2fa8bfe
to
e1ff106
Compare
9d84a9d
to
565ee62
Compare
Failing unit test appears to be unrelated to this change, I've filed #34983 to resolve it. |
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
GOTESTSUM_OPT?= --rerun-fails=1 | ||
GOTESTSUM_OPT?= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this option removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enabling the option led to re-running the failed tests (which mostly failed to to go routine leaks and race conditions), which always led to a passed test. This behavior was from some reason blocking the actual problems which were shown after it was removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this in #31253 because we have a problem with flaky tests and not enough resources to deal with them. I feel like this is still the case and that if we remove this we will get a more flaky CI which is detrimental to contributors. Is there any way we can detect leaks while still re-running other unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not aware of any possibility here. In fact it seems very strange to me that all of the failing tests become passed after re-running them for the 2. time.
We can leave the re-run option in place until we find the root cause why the re-executed tests have very deterministic behavior in terms of go-leaks and data-races, but we should at least consider merging the fixed tests as part of this PR.
Maybe it can be a caching issue in the gotestsum wrapper, not sure here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you report this upstream on the gotestsum repository then to see if it's actually an issue with them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported here
But there seems to be a bigger problem with the --rerun-fails
option, as I see multiple issues created on the upstream related to it https://github.com/gotestyourself/gotestsum/issues
Description:
Link to tracking Issue: #34495