ShaoHe Feng has posted comments on this change.
Change subject: apiTests: silence testMissingSize failure on Python 2.6 ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File tests/apiTests.py Line 227: self.assertEquals(4, reply['error']['code']) Line 228: Line 229: def testMissingSize(self): Line 230: if sys.version_info[0:2] == (2, 6): Line 231: expectedException = socket.error for python 2.7 the struct.error is raised by 'msgLen = JsonRawTest._Size.unpack(data)[0]'. for python 2.6 the socket.error is raised before ._Size.unpack. probably it is raised by sock.recv.
so it may be raised by sock.connect or sock.sendall. such as , the socket server is not setup, sock.error will also come up. IMO, the scope is big to catch socket.error Exception. Line 232: else: Line 233: expectedException = struct.error Line 234: Line 235: self.assertRaises(expectedException, self.sendMessage,
-- To view, visit http://gerrit.ovirt.org/9442 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6d69ec07234c73a884abdc615a33c6b6508b47f5 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server