uitests: Add connection tick failure testing

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson
2020-09-02 12:54:53 -04:00
parent 14232e1aa7
commit 306c6be12f
2 changed files with 15 additions and 0 deletions

View File

@@ -1205,6 +1205,12 @@ class vmmConnection(vmmGObject):
elif obj.is_nodedev() and not pollnodedev:
continue
if self.config.CLITestOptions.conn_crash:
self._backend.close()
e = libvirt.libvirtError("fake error")
e.err = [libvirt.VIR_ERR_SYSTEM_ERROR]
raise e
obj.tick(stats_update=stats_update)
except Exception as e:
log.exception("Tick for %s failed", obj)