Nir Soffer has posted comments on this change.

Change subject: tests: Add tests for poll and wait failures
......................................................................


Patch Set 8:

(2 comments)

https://gerrit.ovirt.org/#/c/65294/8/tests/utilsTests.py
File tests/utilsTests.py:

Line 132:         self.check_failure()
Line 133: 
Line 134:     def test_kill_failure(self):
Line 135:         def fail():
Line 136:             raise ExpectedFailure("Fake kill failure")
> Now we have it 3 times.
3 test, 3 fail texts, please suggest a simple and more clear code.
Line 137: 
Line 138:         self.proc.kill = fail
Line 139:         self.check_failure()
Line 140: 


Line 154:         self.assertEqual(type(e.exception.error), ExpectedFailure)
Line 155: 
Line 156:         # Note: We cannot check return code since 
AsyncProc.returncode is a
Line 157:         # property calling poll(). The return code here may be None 
or -9,
Line 158:         # depeending on timing.
> Wouldn't be better to wait to be sure that timing is correct instead of rem
There is no way to test this with AsyncProc, check how it imlements returncode.
Line 159: 
Line 160: 
Line 161: class ExpectedFailure(Exception):
Line 162:     pass


-- 
To view, visit https://gerrit.ovirt.org/65294
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8674c9c3c2118041c74213cd8ce0d383086d6cbf
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to