You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2022/05/26 13:21:43 UTC

[GitHub] [qpid-proton] DreamPearl commented on a diff in pull request #370: PROTON-2540: [cpp] Provide a way to query proton::connection for the url

DreamPearl commented on code in PR #370:
URL: https://github.com/apache/qpid-proton/pull/370#discussion_r882663780


##########
cpp/src/reconnect_test.cpp:
##########
@@ -129,10 +134,13 @@ class server_connection_handler : public proton::messaging_handler {
 
 class tester_base: public proton::messaging_handler {
   void on_connection_open(proton::connection& c) override {
+    std::string want_url = "amqp://localhost:" + std::to_string(listening_port_);
+
     if (!c.reconnected()) {
       start_count++;
       c.open_sender("messages");
     }
+    ASSERT_EQUAL(c.url(), want_url);

Review Comment:
   @astitcher A minor change from our last discussion. CMIIW
   
   Later I realized that c.active() will always be true in on_connection_open(), so no need of adding an assertion for an exception here for the case when the connection is not active.
   Hence, here just checking for the URL.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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