You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trying to run tests in parallel with suite fails #1253
But this is incompatible with any s.Run in the same test and generally encourages people to avoid s.Run, although I consider it best practice (Antonboom/testifylint#104)
What do you think is the example above valid? Or just black magic? Or I missed something?
Thanks
@Antonboom Users are expecting AfterTest to run after test. We can't can't guarantee that if the test runs in another goroutine because it is Parallel.
So at this point, as a maintainer, it is safer to just discourage using Parallel subtests.
Activity
brackendawson commentedon Aug 17, 2022
This happens because the value returned by
is.T()is the*testing.Tfor the test, not for the subtest.Maybe not a dupe but related to to #187, I think #1109 would fix this.
Antonboom commentedon Jun 6, 2024
@brackendawson, hi!
I found that the pattern
works fine (test).
But this is incompatible with any
s.Runin the same test and generally encourages people to avoids.Run, although I consider it best practice (Antonboom/testifylint#104)What do you think is the example above valid? Or just black magic? Or I missed something?
Thanks
dolmen commentedon Jun 6, 2024
@Antonboom Users are expecting
AfterTestto run after test. We can't can't guarantee that if the test runs in another goroutine because it isParallel.So at this point, as a maintainer, it is safer to just discourage using Parallel subtests.