Merge: Less randomness and race conditions in tests