Avoid false positives with test_server_connectivity_live_migration
The test has been modified to check VM status and connectivity before obtaining the measured network downtime. With this change, the network downtime is measured after network connectivity is recovered after the live-migration is completed, avoiding false positive results. Change-Id: I855534b2662d015715d9acd1e4b98614589df6db
This commit is contained in:
@@ -270,6 +270,11 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
|
||||
new_host = self.get_host_for_server(server['id'])
|
||||
self.assertNotEqual(old_host, new_host, 'Server did not migrate')
|
||||
|
||||
# we first wait until the VM replies pings again, then check the
|
||||
# network downtime
|
||||
self._wait_server_status_and_check_network_connectivity(
|
||||
server, keypair, floating_ip)
|
||||
|
||||
downtime = downtime_meter.get_downtime()
|
||||
self.assertIsNotNone(downtime)
|
||||
LOG.debug("Downtime seconds measured with downtime_meter = %r",
|
||||
@@ -280,9 +285,6 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
|
||||
"Downtime of {} seconds is higher than expected '{}'".format(
|
||||
downtime, allowed_downtime))
|
||||
|
||||
self._wait_server_status_and_check_network_connectivity(
|
||||
server, keypair, floating_ip)
|
||||
|
||||
@decorators.idempotent_id('25b188d7-0183-4b1e-a11d-15840c8e2fd6')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.cold_migration,
|
||||
'Cold migration is not available.')
|
||||
|
||||
Reference in New Issue
Block a user