Change in vdsm[master]: core: Add boot time to the getVdsStats API

nsoffer at redhat.com nsoffer at redhat.com
Wed Apr 2 14:17:20 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: core: Add boot time to the getVdsStats API
......................................................................


Patch Set 11:

(1 comment)

Nice, but the tests are modifying stuff in unsafe way now.

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
You are effecting other tests with this change. This must be done using monkeypatching.

 @MonkeyPatch(samling, 'PROC_STAT_PATH', 'path/to/good/data')
 def testGood(self):
     self.assertEquals(sampling.getBootTime(), 42)

And 'path/to/goo/data' contains:
 
    something
    btime 42
    another
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 <dkuznets at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list