[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests/acceptance/migration.py: Wait for both sides
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] tests/acceptance/migration.py: Wait for both sides |
Date: |
Sun, 31 May 2020 13:58:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 5/28/20 1:24 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> 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 <alex.bennee@linaro.org>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> tests/acceptance/migration.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index 0365289cda..792639cb69 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')
>
Thanks, applied to my python-next tree:
https://gitlab.com/philmd/qemu/commits/python-next