We always queue the DEVICE_DELETED events before successful return from
the command so that tests are reliable. This means we can decrease the
unplug timeout as it's guaranteed to be executed in correct order.
According to my testing it shaves off ~450ms of test run:
real 0m0.721s
vs.
real 0m0.259s
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/qemuhotplugmock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qemuhotplugmock.c b/tests/qemuhotplugmock.c
index 8fe7fe7448..d2324913cf 100644
--- a/tests/qemuhotplugmock.c
+++ b/tests/qemuhotplugmock.c
@@ -45,8 +45,8 @@ qemuDomainGetUnplugTimeout(virDomainObjPtr vm)
* timeout in case of PSeries guest to be consistent with the
* original logic. */
if (qemuDomainIsPSeries(vm->def))
- return 200;
- return 100;
+ return 20;
+ return 10;
}
--
2.26.0