Any good examples, where it caught the design error?
-
-
-
If you can't run a unit test in parallel with others, it necessarily means you're relying on shared or global state. Eliminating that global state by isolating dependencies and making them explicit should be a first-order design goal.
- Još 2 druga odgovora
Novi razgovor -
-
-
I mean this literally:https://gist.github.com/peterbourgon/4288a092ce0f962f5b14e2457085a815 …
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
Sounds like a good idea - what about unit tests that have to be ordered due to referential integrity concerns? e.g. the parent must come before the child in a table? Is there some way around that?
-
This is subjective, but if order matters, then IMO it should be a single unit test. Said another way: it should always be possible to run any unit test in isolation (from a fresh clone, with no other service running, and without internet) and have it pass.
- Još 1 odgovor
Novi razgovor -
-
-
Does one need to call t.Parallel, as tests are run in parallel if you run “go test ./...”? (I know I’m lazy to godoc it, but I’m leaving a comment to remind my future self to do it)
-
Different packages may be run in parallel, but tests in a single package are run serially by default
- Još 1 odgovor
Novi razgovor -
-
-
A similar problem can be addressed by always using -count=2 flag. It helps to identify issues with leaking state of both test and logic.
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
I wish tests were Parallel by default and opt-out. This is horrifying but this is the only way I've managed to figure out how to do it. In large packages it's a quick way to verify if all the tests will parallel pass before sedding all the files.https://godoc.org/4d63.com/testparallel …
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
This is an awesome tip, but it currently collides with `leaktest` we use on each test: https://github.com/fortytw2/leaktest/issues/4 … I think it's doable to mix those two, looking forward to seeing some solution for that! I kind of prefer fewer leaks vs speed of CI, so leaving leaktest for now (:
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.