From 7845c0cdd310b5b25275aff239debfd72f7dceb8 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Tue, 7 Jan 2020 14:46:24 +0100 Subject: [PATCH] Fix excessive runtime of test test_migrate_within_cell The test test_migrate_within_cell functional test takes 160 seconds to run. Seems like the cleanup after the test function takes the extra time. By looking at the test case it starts a migration then if that call returns 202 the test finishes. So the cleanup and the migration happen in parallel. By adding a wait for the server to finish migration removes the excessive run time. Change-Id: Ib4e1712d9724147ec8bdf90a1294041e62dfb136 Closes-Bug: #1858639 --- nova/tests/functional/test_scheduler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/tests/functional/test_scheduler.py b/nova/tests/functional/test_scheduler.py index d9953cdbbc..5d85219600 100644 --- a/nova/tests/functional/test_scheduler.py +++ b/nova/tests/functional/test_scheduler.py @@ -94,5 +94,6 @@ class MultiCellSchedulerTestCase(test.TestCase, # Force the server onto compute1 in cell1 so we do not accidentally # land on compute3 in cell2 and fail to migrate. - self._test_create_and_migrate(expected_status=202, + _, server = self._test_create_and_migrate(expected_status=202, az='nova:compute1') + self._wait_for_state_change(server, 'VERIFY_RESIZE')