Revert "Fix race condition in unit test."

This reverts commit b255aedc26ec09d0eca7c83b94d2b4c7996676e8.

The test should work as it was -- actually seems to be a race in the
thread termination code.