Switch to a more reliable way of discovering when the environment
information is available.
Merge pull request #808 from ClusterHQ/intermittent-test-failure-806

Switch to a more reliable testing method.

Fixes #806.