PROTON-853: revert the change from PROTON-154, including the test since it doesnt actually fail without the change.
This reverts commit 7d3063e7c488c97b9bad61e862d54b2b11dbc3d5. Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d2262bb7 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d2262bb7 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d2262bb7 Branch: refs/heads/kgiusti-python3 Commit: d2262bb7e2ead5b12ed2d4baf94cca6f06e0146c Parents: f7e7ddd Author: Robert Gemmell <[email protected]> Authored: Mon Apr 20 16:47:55 2015 +0100 Committer: Robert Gemmell <[email protected]> Committed: Wed Apr 22 19:26:33 2015 +0100 ---------------------------------------------------------------------- .../qpid/proton/engine/impl/TransportImpl.java | 5 +-- .../qpid/proton/engine/impl/TransportLink.java | 10 ------ tests/python/proton_tests/engine.py | 34 -------------------- 3 files changed, 3 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d2262bb7/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java ---------------------------------------------------------------------- diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java index 551a699..8a7fb32 100644 --- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java +++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java @@ -30,6 +30,7 @@ import org.apache.qpid.proton.amqp.Binary; import org.apache.qpid.proton.amqp.Symbol; import org.apache.qpid.proton.amqp.UnsignedInteger; import org.apache.qpid.proton.amqp.UnsignedShort; +import org.apache.qpid.proton.amqp.security.SaslCode; import org.apache.qpid.proton.amqp.transport.Attach; import org.apache.qpid.proton.amqp.transport.Begin; import org.apache.qpid.proton.amqp.transport.Close; @@ -58,6 +59,7 @@ import org.apache.qpid.proton.engine.Transport; import org.apache.qpid.proton.engine.TransportException; import org.apache.qpid.proton.engine.TransportResult; import org.apache.qpid.proton.engine.TransportResultFactory; +import org.apache.qpid.proton.engine.Sasl.SaslOutcome; import org.apache.qpid.proton.engine.impl.ssl.ProtonSslEngineProvider; import org.apache.qpid.proton.engine.impl.ssl.SslImpl; import org.apache.qpid.proton.framing.TransportFrame; @@ -404,7 +406,7 @@ public class TransportImpl extends EndpointImpl UnsignedInteger localHandle = transportLink.getLocalHandle(); transportLink.clearLocalHandle(); transportSession.freeLocalHandle(localHandle); - transportLink.clearSentAttach(); + Detach detach = new Detach(); detach.setHandle(localHandle); @@ -750,7 +752,6 @@ public class TransportImpl extends EndpointImpl } writeFrame(transportSession.getLocalChannel(), attach, null, null); - transportLink.clearDetachReceived(); transportLink.sentAttach(); } } http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d2262bb7/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportLink.java ---------------------------------------------------------------------- diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportLink.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportLink.java index bdd80b5..836cf71 100644 --- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportLink.java +++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportLink.java @@ -212,11 +212,6 @@ class TransportLink<T extends LinkImpl> return _detachReceived; } - public void clearDetachReceived() - { - _detachReceived = false; - } - public boolean attachSent() { return _attachSent; @@ -227,11 +222,6 @@ class TransportLink<T extends LinkImpl> _attachSent = true; } - public void clearSentAttach() - { - _attachSent = false; - } - public void setRemoteDeliveryCount(UnsignedInteger remoteDeliveryCount) { _remoteDeliveryCount = remoteDeliveryCount; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d2262bb7/tests/python/proton_tests/engine.py ---------------------------------------------------------------------- diff --git a/tests/python/proton_tests/engine.py b/tests/python/proton_tests/engine.py index ca42ac0..b8b165a 100644 --- a/tests/python/proton_tests/engine.py +++ b/tests/python/proton_tests/engine.py @@ -430,40 +430,6 @@ class LinkTest(Test): assert self.snd.state == Endpoint.LOCAL_CLOSED | Endpoint.REMOTE_CLOSED assert self.rcv.state == Endpoint.LOCAL_CLOSED | Endpoint.REMOTE_CLOSED - def test_reopen_on_same_session(self): - """ - confirm that a link is correctly opened when attaching to a previously - detached link on the same session - """ - assert self.snd.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_UNINIT - assert self.rcv.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_UNINIT - - self.snd.open() - self.rcv.open() - self.pump() - - assert self.snd.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE - assert self.rcv.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE - - self.snd.close() - self.rcv.close() - self.pump() - - assert self.snd.state == Endpoint.LOCAL_CLOSED | Endpoint.REMOTE_CLOSED - assert self.rcv.state == Endpoint.LOCAL_CLOSED | Endpoint.REMOTE_CLOSED - - self.snd, self.rcv = self.link("test-link") - assert self.snd.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_UNINIT - assert self.rcv.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_UNINIT - - self.snd.open() - self.rcv.open() - self.pump() - - assert self.snd.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE - assert self.rcv.state == Endpoint.LOCAL_ACTIVE | Endpoint.REMOTE_ACTIVE - - def test_simultaneous_open_close(self): assert self.snd.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_UNINIT assert self.rcv.state == Endpoint.LOCAL_UNINIT | Endpoint.REMOTE_UNINIT --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
