Change in vdsm[master]: tests: virt: add infrastructure to test getStats

fromani at redhat.com fromani at redhat.com
Fri Apr 18 07:15:54 UTC 2014


Francesco Romani has posted comments on this change.

Change subject: tests: virt: add infrastructure to test getStats
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.ovirt.org/#/c/26536/2/tests/vmTests.py
File tests/vmTests.py:

Line 898:     vm._initVmStats()
Line 899:     try:
Line 900:         yield vm
Line 901:     finally:
Line 902:         if vm._vmStats:
> you initialize this data member 4 lines above - why do you check it again?
No good reason, most likely a relic of past revisions. Will simplify.
Line 903:             vm._vmStats.stop()
Line 904: 
Line 905: 
Line 906: class TestVmStats(TestCaseBase):


Line 936:             # HACKs
Line 937:             'pauseCode': 'NOERR',
Line 938:         }
Line 939:         with FakeVM(vmParams) as fake:
Line 940:             with ensureVmStats(fake):
> why is it required to have vmStats running at this stage? how can you be su
For the tests currently implemented, no need to to have the vmStatsThread running, it is enough to have it setup and to have the vm._vmStats field not None (and that happens on initVmStats()).

This is because the tests currently implemented are meant to check the response is conforming to the schema, so it is OK if the stats do not contain valid data as long as they are correctly formatted.


-- 
To view, visit http://gerrit.ovirt.org/26536
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I28154f54995e2ff9a94c5da6ee38eaa5ed7d9b6d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr 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