-
Notifications
You must be signed in to change notification settings - Fork 13
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
Is there a way to ignore an specific test function/file? #31
Comments
I am unsure of what your set-up is, but can't you avoid running your tests in parallel by doing |
Running the test in parallel speeds up the process, so if I run the test with the |
I am not sure of the test setup, but we do have two flags to ignore the tests. Would they work?
|
Some workarounds I use: // If using golangci lint
//nolint:paralleltest // foo cannot be run in parallel
func TestFoo(t *testing.T) {
foo()
}
func TestFoo2(t *testing.T) {
t.Parallel()
runtime.LockOSThread()
foo()
runtime.UnlockOSThread()
} |
I'm using the gock library to test my HTTP request, but it doesn't play well with concurrency, so I need those tests to not run in parallel. Is there a way for me to ignore those tests without disabling the rule?
The text was updated successfully, but these errors were encountered: