Dan Kenigsberg has uploaded a new change for review.
Change subject: Revert "Save a few seconds while running misc tests"
......................................................................
Revert "Save a few seconds while running misc tests"
This reverts commit 86a259a804fbe6ebac600511f10fdae9b093b552.
as it causes a yet-unexplained regression in jenkins's unit tests
FAIL: test (miscTests.GetCmdArgsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jenkins/workspace/vdsm_unit_tests/tests/miscTests.py", line 77, in
test
self.assertEquals(misc.getCmdArgs(sproc.pid), args)
AssertionError: Tuples differ: () != ('sleep', '4')
Second tuple contains 2 additional elements.
First extra element 0:
sleep
- ()
+ ('sleep', '4')
Change-Id: I92ef357cb68c0d54c8520fd1f51bc8c90c0f2f22
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/miscTests.py
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/8957/1
diff --git a/tests/miscTests.py b/tests/miscTests.py
index aa03312..6339986 100644
--- a/tests/miscTests.py
+++ b/tests/miscTests.py
@@ -60,13 +60,14 @@
sleepProcs.append(misc.execCmd(["sleep", "3"],
sync=False,
sudo=False))
+ time.sleep(1)
+
pids = misc.pgrep("sleep")
for proc in sleepProcs:
self.assertTrue(proc.pid in pids, "pid %d was not located by
pgrep"
% proc.pid)
for proc in sleepProcs:
- proc.kill()
proc.wait()
@@ -74,8 +75,8 @@
def test(self):
args = ("sleep", "4")
sproc = misc.execCmd(args, sync=False, sudo=False)
+ time.sleep(1)
self.assertEquals(misc.getCmdArgs(sproc.pid), args)
- sproc.kill()
sproc.wait()
@@ -83,13 +84,13 @@
def test(self):
args = ["sleep", "3"]
sproc = misc.execCmd(args, sync=False, sudo=False)
+ time.sleep(1)
stats = misc.pidStat(sproc.pid)
pid = int(stats[0])
# procName comes in the format of (procname)
name = stats[1]
self.assertEquals(pid, sproc.pid)
self.assertEquals(name, args[0])
- sproc.kill()
sproc.wait()
--
To view, visit
http://gerrit.ovirt.org/8957
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92ef357cb68c0d54c8520fd1f51bc8c90c0f2f22
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>