diff options
author | Kevin Wolf <kwolf@redhat.com> | 2024-01-25 16:21:50 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2024-01-26 12:26:35 +0100 |
commit | c9c0b37ff4c11b712b21efabe8e5381d223d0295 (patch) | |
tree | 07a9a09a08e3e00feda76feaf8cbe51336999914 /tests/qemu-iotests | |
parent | 63b18312d14ac984acaf13c7c55d9baa2d61496e (diff) | |
download | qemu-c9c0b37ff4c11b712b21efabe8e5381d223d0295.zip qemu-c9c0b37ff4c11b712b21efabe8e5381d223d0295.tar.gz qemu-c9c0b37ff4c11b712b21efabe8e5381d223d0295.tar.bz2 |
iotests/iothreads-stream: Use the right TimeoutError
Since Python 3.11 asyncio.TimeoutError is an alias for TimeoutError, but
in older versions it's not. We really have to catch asyncio.TimeoutError
here, otherwise a slow test run will fail (as has happened multiple
times on CI recently).
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20240125152150.42389-1-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rwxr-xr-x | tests/qemu-iotests/tests/iothreads-stream | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qemu-iotests/tests/iothreads-stream b/tests/qemu-iotests/tests/iothreads-stream index 503f221..231195b 100755 --- a/tests/qemu-iotests/tests/iothreads-stream +++ b/tests/qemu-iotests/tests/iothreads-stream @@ -18,6 +18,7 @@ # # Creator/Owner: Kevin Wolf <kwolf@redhat.com> +import asyncio import iotests iotests.script_initialize(supported_fmts=['qcow2'], @@ -69,6 +70,6 @@ with iotests.FilePath('disk1.img') as base1_path, \ # The test is done once both jobs are gone if finished == 2: break - except TimeoutError: + except asyncio.TimeoutError: pass vm.cmd('query-jobs') |