Fix "test_share_server_migration" sporadic failure
The test in question kicks off the second phase
of share server migration (migration complete).
When the task state of the destination server
changes to "migration_success", it checks if the
source server has been deleted. The problem is
that the deletion isn't instantaneous [1]. So,
lets wait for the cleanup rather than expect
to not find the source share server as soon as
the migration is completed.
[1] 5866dadd4b/manila/share/manager.py (L5658-L5674)
Change-Id: I385d0bf4b16083d9630969319ecc752681e8fe87
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
parent
8f60f6928f
commit
00caf0a5a5
@ -331,9 +331,8 @@ class ShareServersMigrationBase(base.BaseTestCase):
|
||||
share_server_id)
|
||||
server = self.admin_client.wait_for_server_migration_task_state(
|
||||
dest_share_server_id, dest_host, task_state)
|
||||
self.assertRaises(exceptions.NotFound,
|
||||
self.admin_client.get_share_server,
|
||||
share_server_id)
|
||||
|
||||
self.admin_client.wait_for_share_server_deletion(share_server_id)
|
||||
else:
|
||||
self.admin_client.share_server_migration_cancel(server['id'])
|
||||
task_state = constants.TASK_STATE_MIGRATION_CANCELLED
|
||||
|
Loading…
x
Reference in New Issue
Block a user