Fix race in delete allocation in ServerMovingTests
When an instance is deleted the allocation of that instance is freed
after the instance is destroyed in the db. The functional tests that
asserting resource allocation after instance delete are waiting for
the instance to disappear from the REST API. This made such tests
racy.
Fortunately the instance.delete.end notification is emitted after
the instance allocation is freed. This patch fixes the race in the
test by waiting for the instance.delete.end notification before
asserting that the allocation is freed properly.
Reviewed: https:/ /review. openstack. org/507911 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8a435c081df 1653620cff5918e a66643d3487fd7
Committed: https:/
Submitter: Zuul
Branch: master
commit 8a435c081df1653 620cff5918ea666 43d3487fd7
Author: Balazs Gibizer <email address hidden>
Date: Wed Sep 27 17:56:17 2017 +0200
Fix race in delete allocation in ServerMovingTests
When an instance is deleted the allocation of that instance is freed
after the instance is destroyed in the db. The functional tests that
asserting resource allocation after instance delete are waiting for
the instance to disappear from the REST API. This made such tests
racy.
Fortunately the instance.delete.end notification is emitted after
the instance allocation is freed. This patch fixes the race in the
test by waiting for the instance.delete.end notification before
asserting that the allocation is freed properly.
Change-Id: I4ffd8eae73600e b2d4f6929ee6a77 68adb80081d
Closes-Bug: #1719915