Change in vdsm[master]: tests: reduce noice after running detector test

nsoffer at redhat.com nsoffer at redhat.com
Thu Apr 9 16:56:35 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: tests: reduce noice after running detector test
......................................................................


Patch Set 6:

(1 comment)

https://gerrit.ovirt.org/#/c/39031/6/tests/protocoldetectorTests.py
File tests/protocoldetectorTests.py:

Line 54
Line 55
Line 56
Line 57
Line 58
The root cause is not checking the return value of dispatcher.recv().

When a socket is disconnected in the client side, recv() return an empty string.

So the real fix is very simple:

    while "\n" not in request:
        chunk = dispatcher.recv(1024)
        if chunk == "":
            return
        request += chunk

This fixes the errors on shutdown.

Closing the threads explicitly may be better, but lets first fix this issue.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I23302c7f742f31f0ab5e12265da3bb7f57a81d80
Gerrit-PatchSet: 6
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: Dima Kuznetsov <dkuznets at redhat.com>
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: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list