Fix race fail in test_resize_with_reschedule_then_live_migrate
The assertion in the test that the migration status is 'completed'
is flawed in that it assumes when the instance status is 'ACTIVE'
the migration is completed, which isn't True, since the instance
status gets changed before the migration is completed, but they are
very close in time so there is a race, which is how this test slipped
by. This fixes the issue by polling the migration status until it
is actually completed or we timeout.
Reviewed: https:/ /review. openstack. org/560454 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4afa8c2b979 29faaf8bbf2bbaa 72235fab7d3d13
Committed: https:/
Submitter: Zuul
Branch: master
commit 4afa8c2b97929fa af8bbf2bbaa7223 5fab7d3d13
Author: Matt Riedemann <email address hidden>
Date: Wed Apr 11 10:43:34 2018 -0400
Fix race fail in test_resize_ with_reschedule _then_live_ migrate
The assertion in the test that the migration status is 'completed'
is flawed in that it assumes when the instance status is 'ACTIVE'
the migration is completed, which isn't True, since the instance
status gets changed before the migration is completed, but they are
very close in time so there is a race, which is how this test slipped
by. This fixes the issue by polling the migration status until it
is actually completed or we timeout.
Change-Id: I61f745667f4c00 3d7e3ca6f2f9a99 194930ac892
Closes-Bug: #1762876