The test setup is not threadsafe. Wrap in a mutex.