Nir Soffer has posted comments on this change. Change subject: core: Add boot time to the getVdsStats API ......................................................................
Patch Set 11: (1 comment) http://gerrit.ovirt.org/#/c/25877/11/tests/samplingTests.py File tests/samplingTests.py: Line 53: with open(path, 'w') as f: Line 54: f.write(content) Line 55: # monkeypatch has no idea where our new file is but it will clean Line 56: # up the value for us Line 57: sampling.PROC_STAT_PATH = path > The above @MonkeyClass takes care of this. Missed it, but would it be cleaner to monkey patch what you need? here you monkey patch the class with something that does not make any sense, just to get the side effect of restoring the old value, and then you modify the value in a way that looks unsafe in multiple places. Line 58: return sampling.getBootTime() Line 59: Line 60: def testBootTimeOk(self): Line 61: self.assertEquals(self.getFakeBootTime(self.fixture_good), -- To view, visit http://gerrit.ovirt.org/25877 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I319e619cdaecac2f86d0154e3adbb3beda9c57d6 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dima Kuznetsov <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Dima Kuznetsov <[email protected]> Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
