From b8c02497b3562292c55506945bd69aa04ebee981 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 23 Apr 2020 10:33:58 +0200 Subject: [PATCH] mock: qemuDomainGetUnplugTimeout: Decrease timeout 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 Reviewed-by: Michal Privoznik --- 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; }