Zhou Zheng Sheng has posted comments on this change.
Change subject: [WIP]normalize startup: seperate supervdsm framework err and function err ......................................................................
Patch Set 3: (1 inline comment)
.................................................... File tests/superVdsmTests.py Line 71: def testKillSuper(self): Line 72: self._proxy.kill() Line 73: self.assertFalse(self._proxy.isFunctional()) Line 74: self._proxy.launch() # Launching vdsm after kill Line 75: self.assertTrue(self._proxy.isFunctional()) I'd like to see a unit test for re-raising payload exception. In super vdsm server, we can add a new method like,
def raiseExt(self, ext): '''Just for unit test''' raise ext
then add a test like,
def testServerNotAffectedByPayloadException(self): launch the super vdsm server assert the server is functional open self._proxy.pidfile and read the content to a variable "pid"
class PayloadError(Exception): pass self.assertRaises(PayloadError, self._proxy.raiseExt, PayloadError("Simulate an exception inside the called method"))
assert the server is still functional open self._proxy.pidfile again and assert the content is equal to "pid"
-- To view, visit http://gerrit.ovirt.org/10236 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib25809d4416f26bc95dc72e7b32b8b2a17a71879 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server