From: Dr. David Alan Gilbert Date: Thu, 28 May 2020 11:24:04 +0000 (+0100) Subject: tests/acceptance/migration.py: Wait for both sides X-Git-Tag: v5.1.0-rc0~100^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c9120a223e666d7171e965b8f8bbcd72620f566;p=thirdparty%2Fqemu.git tests/acceptance/migration.py: Wait for both sides When the source finishes migration the destination will still be receiving the data sent by the source, so it might not have quite finished yet, so won't quite have reached 'completed'. This lead to occasional asserts in the next few checks. After the source has finished, check the destination as well. (We can't just switch to checking the destination, because it doesn't give a status until it has started receiving the migration). Reported-by: Alex Bennée Signed-off-by: Dr. David Alan Gilbert Tested-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200528112404.121972-1-dgilbert@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index 0365289cda8..792639cb693 100644 --- a/tests/acceptance/migration.py +++ b/tests/acceptance/migration.py @@ -35,6 +35,10 @@ class Migration(Test): timeout=self.timeout, step=0.1, args=(src_vm,)) + wait.wait_for(self.migration_finished, + timeout=self.timeout, + step=0.1, + args=(dst_vm,)) self.assertEqual(src_vm.command('query-migrate')['status'], 'completed') self.assertEqual(dst_vm.command('query-migrate')['status'], 'completed') self.assertEqual(dst_vm.command('query-status')['status'], 'running')