URL: https://github.com/SSSD/sssd/pull/25
Title: #25: TESTS: Add integration tests for the proxy provider of sssd-secrets

jhrozek commented:
"""
On Tue, Sep 20, 2016 at 04:45:53AM -0700, lslebodn wrote:
> On (20/09/16 04:09), Jakub Hrozek wrote:
> >I was getting random failures where the socket was not yet ready without
> >the sleep, like this:
> >    ConnectionError: ('Connection aborted.', error(2, 'No such file or
> >    directory'))
> >
> >I think the test was just too fast. I pushed a new version that instead
> >tries to connect to the socket and waits 0.2 sec if it cannot. The test
> >gives up after a second.
> >
> Active checking of socket is much better approach.
> I think you forgot to close socket :-)

No, I was relying on garbage collector:
    socket.close()
    Close the socket. All future operations on the socket object will
    fail. The remote end will receive no more data (after queued data is
    flushed). Sockets are automatically closed when they are
    garbage-collected.

But it's a good idea to add close explicitly, because at least we get an
exception if the socket was not connected.

> 
> I would also appreciate smaller waits (0.1 or even 0.05)
> it's up to you.

changed.

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/25#issuecomment-248281373
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to