We've just been caught out by what I'd say is a massive gotcha about go test!

When invoked with multiple packages the tests for said packages run in parallel!

While this is fine if the tests themselves are totally self contained, with no external dependencies, if they do well all bets are off!

We've just wasted multiple hours here chasing a bug in a test which turned out to be one package trashing the results of the other.

In our case the binaries where running tests against a redis backend so go very confused when the two tests started to run at the same time.

While running tests in parallel is not a bad thing, and likely speeds up the testing process, it REALLY should be documented that multiple package tests will be run at the same time.

Anyway hope this post helps others avoid major time wastage

    Regards
    Steve

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to