Nir Soffer has posted comments on this change. Change subject: tests: clear libvirtconnection cache ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/37747/1/lib/vdsm/libvirtconnection.py File lib/vdsm/libvirtconnection.py: Line 101: libvirt.openAuth, uri, auth, 0) Line 102: return utils.retry(libvirtOpen, timeout=10, sleep=0.2) Line 103: Line 104: Line 105: def clear(): What will happen if we use this in the application? Lets make it private so it is clear that you are not allowed to call this, and document why this method exists: For clearing connections during the tests. So nobody assumes that this is a private function that the application do not use, and can be safely removed :-) Line 106: """ Line 107: for debug purposes only Line 108: """ Line 109: with __connectionLock: http://gerrit.ovirt.org/#/c/37747/1/tests/libvirtconnectionTests.py File tests/libvirtconnectionTests.py: Line 106: class testLibvirtconnection(TestCaseBase): Line 107: Line 108: @classmethod Line 109: def tearDownClass(cls): Line 110: libvirtconnection.clear() Leaving dirty libvirt between the tests is fragile. Lets make this regular tearDown() method and clean up after every test. Line 111: Line 112: @MonkeyPatch(libvirtconnection, 'libvirt', LibvirtMock()) Line 113: @MonkeyPatch(constants, 'P_VDSM_LIBVIRT_PASSWD', '/dev/null') Line 114: def testCallSucceeded(self): -- To view, visit http://gerrit.ovirt.org/37747 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4d64920e5f26c276accf26b7a532461d04f02df Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Ala Hino <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
