Centralize test helpers and try to make spurious failures from output interleaving less frequent.