Can somebody help me with go tests [PASSES individually but FAILS collectively] #7495
-
As indicated in the title, I'm encountering a situation where certain test cases fail only when run collectively, even though each one succeeds when executed independently. I believe my understanding of writing mocks and comprehending how Go conducts tests might be incomplete, serving as a primary obstacle. Unfortunately, sharing the extensive code here isn't feasible. I'm open to scheduling a meeting to collaboratively address and resolve these issues. Any assistance would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@tiklup11 thank you for the catch-up! Can you provide a reproducer? I'm assuming we're talking about the unit tests. |
Beta Was this translation helpful? Give feedback.
-
@tiklup11, I run the following against the current
With and without the following set:
There were no issues for me, and things build and run fine. What version (or tag) are you running the tests for? What is the environment you run the tests under, if you don't mind me asking? That would be the operating system used, the Go version, what build time dependencies you have installed, etc. Do you have all the necessary build and runtime dependencies installed and a Go version of at least 1.20.10 or newer? If you can, I suggest trying a new and pristine virtual machine to see how things work there. This is what I did. |
Beta Was this translation helpful? Give feedback.
@tiklup11, I run the following against the current
main
branch:make clean all test-binaries testunit bom verify-dependencies
With and without the following set:
There were no issues for me, and things build and run fine.
What version (or tag) are you running the tests for?
What is the environment you run the tests under, if you don't mind me asking? That would be the operating system used, the Go version, what build time dependencies you have installed, etc.
Do you have all the necessary build and runtime dependencies installed and …