Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
[RFR] Fix test_multi_host_multi_vm_migration (#10102)
Browse files Browse the repository at this point in the history
* Fix test_multi_host_multi_vm_migration

* Fix test_multi_host_multi_vm_migration
  • Loading branch information
nachandr authored May 8, 2020
1 parent 9e725ac commit f3fc15a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions cfme/tests/v2v/test_v2v_migrations_single_vcenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def test_single_vm_migration_power_state_tags_retirement(appliance, provider,
@pytest.mark.parametrize('source_type, dest_type, template_type',
[
['nfs', 'nfs', [Templates.RHEL7_MINIMAL,
Templates.UBUNTU16_TEMPLATE,
Templates.RHEL69_TEMPLATE,
Templates.WIN7_TEMPLATE]
Templates.RHEL7_MINIMAL,
Templates.RHEL7_MINIMAL,
Templates.RHEL7_MINIMAL]
]
])
def test_multi_host_multi_vm_migration(request, appliance, provider,
Expand Down Expand Up @@ -137,14 +137,17 @@ def test_multi_host_multi_vm_migration(request, appliance, provider,
vms = request_details_list.read()
# testing multi-host utilization

def _is_migration_started():
for vm in vms:
if 'Migrating' not in request_details_list.get_message_text(vm):
return False
return True
match = ['Converting', 'Migrating']

def _is_migration_started(vm):
if any(string in request_details_list.get_message_text(vm) for string in match):
return True
return False

for vm in vms:
wait_for(func=_is_migration_started, func_args=[vm],
message="migration has not started for all VMs", delay=5, num_sec=300)

wait_for(func=_is_migration_started, message="migration is not started for all VMs, "
"be patient please", delay=5, num_sec=5400)
host_creds = provider.hosts.all()
hosts_dict = {key.name: [] for key in host_creds}
for vm in vms:
Expand Down

0 comments on commit f3fc15a

Please sign in to comment.