pjfawcett commented on a change in pull request #293: URL: https://github.com/apache/qpid-proton/pull/293#discussion_r566310723
########## File path: cpp/src/link_test.cpp ########## @@ -45,8 +55,107 @@ int test_link_name() return 0; } +/* + * Want to test remote properties so need to run a container and make loopback links. + * Basing these classes on those used in container_test.cpp but reducing the checks on + * container logic as that is not the subject of these tests. + */ + +class test_handler : public proton::messaging_handler { + public: + bool done; + bool had_receiver; + bool had_sender; + + proton::listener listener; + proton::connection connection; + + proton::receiver_options receiver_options; + proton::sender_options sender_options; + + std::map<proton::symbol, proton::value> peer_receiver_properties; + std::map<proton::symbol, proton::value> peer_sender_properties; + + test_handler(const proton::receiver_options &r_opts=proton::receiver_options(), + const proton::sender_options &s_opts=proton::sender_options()) + : done(false), + had_receiver(false), + had_sender(false), + receiver_options(r_opts), + sender_options(s_opts) + {} + + void on_container_start(proton::container &c) PN_CPP_OVERRIDE { + listener = c.listen("//:5678"); // Dynamic port doesn't work on MAC build - presumably not allocated until later + connection = c.connect("//:5678"); Review comment: Will do ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org