Address race condition in client tests (closes #784)