qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject qpid-dispatch git commit: DISPATCH-964 - Remove the spurious error indication on the closing of auto-links. Add test coverage for this condition.
Date Wed, 11 Apr 2018 20:22:48 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master f4aef4f9e -> 0ad6e6ff5


DISPATCH-964 - Remove the spurious error indication on the closing of auto-links.  Add test
coverage for this condition.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/0ad6e6ff
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/0ad6e6ff
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/0ad6e6ff

Branch: refs/heads/master
Commit: 0ad6e6ff54443bcfaeac7ca5bcbe6081be2c17e7
Parents: f4aef4f
Author: Ted Ross <tross@redhat.com>
Authored: Wed Apr 11 15:50:51 2018 -0400
Committer: Ted Ross <tross@redhat.com>
Committed: Wed Apr 11 15:50:51 2018 -0400

----------------------------------------------------------------------
 src/router_core/route_control.c |  2 +-
 tests/system_tests_autolinks.py | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/0ad6e6ff/src/router_core/route_control.c
----------------------------------------------------------------------
diff --git a/src/router_core/route_control.c b/src/router_core/route_control.c
index c7e043e..61f426d 100644
--- a/src/router_core/route_control.c
+++ b/src/router_core/route_control.c
@@ -257,7 +257,7 @@ static void qdr_auto_link_deactivate_CT(qdr_core_t *core, qdr_auto_link_t
*al, q
     qdr_route_log_CT(core, "Auto Link Deactivated", al->name, al->identity, conn);
 
     if (al->link) {
-        qdr_link_outbound_detach_CT(core, al->link, 0, QDR_CONDITION_ROUTED_LINK_LOST,
true);
+        qdr_link_outbound_detach_CT(core, al->link, 0, QDR_CONDITION_NONE, true);
         al->link->auto_link = 0;
         al->link            = 0;
     }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/0ad6e6ff/tests/system_tests_autolinks.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_autolinks.py b/tests/system_tests_autolinks.py
index 57dc397..1feca3a 100644
--- a/tests/system_tests_autolinks.py
+++ b/tests/system_tests_autolinks.py
@@ -182,8 +182,9 @@ class AutolinkTest(TestCase):
 
     def test_06_manage_autolinks(self):
         """
-        Create a route-container connection and a normal receiver.  Ensure that messages
sent from the
-        route-container are received by the receiver and that settlement propagates back
to the sender.
+        Create a route-container connection and a normal receiver.  Use the management API
to create
+        autolinks to the route container.  Verify that the links are created.  Delete the
autolinks.
+        Verify that the links are closed without error.
         """
         test = ManageAutolinksTest(self.normal_address, self.route_address)
         test.run()
@@ -726,6 +727,12 @@ class ManageAutolinksTest(MessagingHandler):
                 self.send_ops()
 
     def on_link_remote_close(self, event):
+        if event.link.remote_condition != None:
+            self.error = "Received unexpected error on link-close: %s" % event.link.remote_condition.name
+            self.timer.cancel()
+            self.normal_conn.close()
+            self.route_conn.close()
+
         self.n_detached += 1
         if self.n_detached == self.count:
             self.timer.cancel()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message