Although computers tend to be rather deterministic in nature, you will sometimes have to deal with concepts that are de-facto non-deterministic. These include, but are not limited to:
When testing code, non-determinism is undesirable, since one of the main principles of automated testing is that test results are reproducable; if you run a unit test suite a number of times without changing the code, the outcomes should all be identical. If your test target contains non-deterministic logic, you may find this principle difficult to uphold. In a small series of postings, I'll provide a few pointers on how to deal with this challenge.
Each post will cover a particular type of non-determinism, and provide examples on how to handle it in unit tests: