[ 
https://issues.apache.org/jira/browse/PROTON-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317027#comment-14317027
 ] 

Andrew Stitcher commented on PROTON-804:
----------------------------------------

I believe that the test case is in error:
{code}
    p = srv.pending()
    self.peer.push(srv.peek(p))
    srv.pop(p)

    # I would expect to be able to assert this, but the server seems
    # to get stuck after sending over the SASL header
    #assert self.conn.remote_condition != None
{code}
The first block of code assumes that there must be bytes to read however as far 
as I can tell closing the connection would be just as valid.

The second (comment) block is also in error: The test case closed the 
connection before even the SASL layer finished authenticating, so it is a 
mistake to assume anything about any frames that come back (if any do)

It's currently the case the when pn_do_error() is called before the the AMQP 
header has been sent there is no way to know what the client side of the 
connection can interpret from the bytes on the wire. No AMQP header will be 
sent, and whether or not the SASL header and minimal frames (init, done) has 
been sent is not known either.

So in this case the test is attempting to test specific implementation 
behaviour (not protocol related) that cannot be relied on.

> the transport doesn't always shutdown its output properly
> ---------------------------------------------------------
>
>                 Key: PROTON-804
>                 URL: https://issues.apache.org/jira/browse/PROTON-804
>             Project: Qpid Proton
>          Issue Type: Bug
>            Reporter: Rafael H. Schloming
>            Assignee: Andrew Stitcher
>         Attachments: transport-test.patch
>
>
> I believe the issue is related to the autodetect code andrew added not too 
> long ago. I've attached a patch that has a test case with a relatively 
> minimal reproducer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to