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: I4ffd8eae73600eb2d4f6929ee6a7768adb80081d
Closes-Bug: #1719915
(cherry picked from commit 8a435c081df1653620cff5918ea66643d3487fd7)
Reviewed: https:/ /review. openstack. org/508872 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=aabf0b0bf60 c513accc32a5084 bb42093b65eb31
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit aabf0b0bf60c513 accc32a5084bb42 093b65eb31
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 620cff5918ea666 43d3487fd7)
Closes-Bug: #1719915
(cherry picked from commit 8a435c081df1653