Hi,

While playing around with the proton-c engine, I tried to re-open a link that I 
had previously closed.  The link failed to come up - but no error state was 
returned.

Should the engine allow a previously closed link to be re-opened?  IOW, should 
the engine allow the following Link test to pass (code refactored from 
tests/python/proton_tests/engine.py LinkTests):

  def test_open_close_reopen(self):

    self.snd.open()
    self.pump()
    self.rcv.open()
    self.pump()

    print "both open"
    print "SEND STATE %s" % hex(self.snd.state)
    print "RCV STATE %s" % hex(self.rcv.state)
    assert self.snd.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE
    assert self.rcv.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE

    self.snd.close()
    self.pump()
    self.rcv.close()
    self.pump()

    print "both closed"
    print "SEND STATE %s" % hex(self.snd.state)
    print "RCV STATE %s" % hex(self.rcv.state)
    assert self.snd.state == Endpoint.LOCAL_CLOSED | Endpoint.REMOTE_CLOSED
    assert self.rcv.state == Endpoint.LOCAL_CLOSED | Endpoint.REMOTE_CLOSED

    self.rcv.session.connection._transport.trace(Transport.TRACE_FRM)
    self.snd.session.connection._transport.trace(Transport.TRACE_FRM)

    print "Re opening..."
    self.rcv.open()
    self.pump()
    self.snd.open()
    self.pump()
    assert self.snd.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE
    assert self.rcv.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE

-- 
-K

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to