gds-operations/vcloud-core — pull request #148 by dcarley (2014-12-03 11:50:55+00:00)
Title: Sleep in logout test because appears to be async

Reluctant and speculative!

---

This integration test very occasionally fails with:

1) Vcloud::Core::Fog#logout with a valid token should invalidate a previously working session
Failure/Error: expect{ fsi.session }.to raise_error(
expected Fog::Compute::VcloudDirector::Forbidden with "Access is forbidden" but nothing was raised
# ./spec/integration/core/fog_spec.rb:29:in `block (4 levels) in '

It passes again on a subsequent run and is very difficult to reproduce. The
only reason for this that I can think of is that the `/logout` endpoint is
ever so slightly asynchronous and doesn't immediately revoke the session
after return a `204` response. It doesn't provide a task that we can monitor
the progress of so this hack seems to be the only way that we can guard
against the intermittent (and confusing) failure.