]> xenbits.xensource.com Git - libvirt.git/commitdiff
mock: qemuDomainGetUnplugTimeout: Decrease timeout
authorPeter Krempa <pkrempa@redhat.com>
Thu, 23 Apr 2020 08:33:58 +0000 (10:33 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 23 Apr 2020 13:57:36 +0000 (15:57 +0200)
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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuhotplugmock.c

index 8fe7fe7448232904275e9034f559ac33362318d4..d2324913cf9cb26924d610faa64843b9c28bf854 100644 (file)
@@ -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;
 }