Avoid writing test cases with side effects. Additional threads may change the state of your system and cause random test failures.