Change in vdsm[master]: terminating tests - verify process death
nsoffer at redhat.com
nsoffer at redhat.com
Sun Jan 24 20:26:04 UTC 2016
Nir Soffer has posted comments on this change.
Change subject: terminating tests - verify process death
......................................................................
Patch Set 8:
(2 comments)
https://gerrit.ovirt.org/#/c/52362/8/tests/utilsTests.py
File tests/utilsTests.py:
Line 96: self.assertTrue(os.path.exists(self.proc_path))
Line 97: self.reaped = set()
Line 98:
Line 99: def tearDown(self):
Line 100: if self.proc.returncode is None:
This must use self.proc.poll() so this code will work with Python 3 (doing poll() when accessing returncode is cool but non-standard behavior, and we cannot depend on such "improvements")
Line 101: self.kill_proc()
Line 102:
Line 103: def test_terminating(self):
Line 104: with utils.terminating(self.proc):
Line 117: self.reaped.add
Line 118: )]):
Line 119: self.proc.kill = fake_kill
Line 120: with utils.terminating(self.proc):
Line 121: self.assertTrue(os.path.exists(self.proc_path))
We don't anything here - test that process pid was *not* added to self.reaped.
Line 122:
Line 123: def test_terminating_with_infected_kill(self):
Line 124: with MonkeyPatchScope([(zombiereaper,
Line 125: 'autoReapPID',
--
To view, visit https://gerrit.ovirt.org/52362
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib1600a298b3faaffe3cc72b4eb62201370bf03c7
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list