Change in vdsm[master]: test: jsonRpcTests not stable

nsoffer at redhat.com nsoffer at redhat.com
Mon Feb 17 15:17:17 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: test: jsonRpcTests not stable
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/24575/1//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: test: jsonRpcTests not stable
Line 8: 
Line 9: settimeout should be run before connect but during tests close method
Line 10: closes the socket id for the process but the connection is still opened
Do you mean "socket fd"?

Do you mean "the connection is still opened."?
Line 11: if another process shares this socket id so from time to time the socket
Line 12: is reused and error 'Bad file descriptor' is raised during next test.
Line 13: 
Line 14: Change-Id: Icc114b5241dc7db715023524f11c81689847e75f


Line 8: 
Line 9: settimeout should be run before connect but during tests close method
Line 10: closes the socket id for the process but the connection is still opened
Line 11: if another process shares this socket id so from time to time the socket
Line 12: is reused and error 'Bad file descriptor' is raised during next test.
Do you mean that we use the file descriptor after it was closed?
Line 13: 
Line 14: Change-Id: Icc114b5241dc7db715023524f11c81689847e75f


http://gerrit.ovirt.org/#/c/24575/1/lib/yajsonrpc/asyncoreReactor.py
File lib/yajsonrpc/asyncoreReactor.py:

Line 137:         self._chat.push(self._impl.buildMessage(message), self._dispatcher)
Line 138:         self._reactor.wakeup()
Line 139: 
Line 140:     def close(self):
Line 141:         self._dispatcher.socket.shutdown(socket.SHUT_RDWR)
How this will solve double close (this seems to be the problem according to the commit message.

This should help in getting data sent through the socket to the other side. Instead of getting a connection reset, you will get EPIPE after your read all the data.
Line 142:         self._dispatcher.close()
Line 143: 
Line 144: 
Line 145: def AsyncoreListener(reactor, address, acceptHandler, sslctx=None):


-- 
To view, visit http://gerrit.ovirt.org/24575
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icc114b5241dc7db715023524f11c81689847e75f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list