[ https://issues.apache.org/jira/browse/PROTON-1158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15189716#comment-15189716 ]
ASF GitHub Bot commented on PROTON-1158: ---------------------------------------- GitHub user ganeshmurthy opened a pull request: https://github.com/apache/qpid-proton/pull/70 PROTON-1158 - Removed hardcoded port 12345 from MessengerSSLTests. Us… …ed free_tcp_ports() instead You can merge this pull request into a Git repository by running: $ git pull https://github.com/ganeshmurthy/qpid-proton PROTON-1158 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/qpid-proton/pull/70.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #70 ---- commit aafdea23d752fdde6ba7981cdb282fb9a022c6ee Author: Ganesh Murthy <gmur...@redhat.com> Date: 2016-03-10T18:42:05Z PROTON-1158 - Removed hardcoded port 12345 from MessengerSSLTests. Used free_tcp_ports() instead ---- > [proton-c] Some messenger SSL tests use hardcoded port number 12345 > ------------------------------------------------------------------- > > Key: PROTON-1158 > URL: https://issues.apache.org/jira/browse/PROTON-1158 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding > Affects Versions: 0.12.0 > Reporter: Ganesh Murthy > Assignee: Ganesh Murthy > Priority: Minor > > A couple of tests in the MessengerSSLTests (in > tests/python/proton_tests/ssl.py) hard code the port numbers as 12345 > {code} > def test_server_credentials(self, > cert="server-certificate.pem", > key="server-private-key.pem", > password="server-password", > exception=None): > import sys > # java doesn't do validation in the same way (yet) > if exception and "java" in sys.platform: > raise Skipped() > self.server.certificate = _testpath(cert) > self.server.private_key = _testpath(key) > self.server.password = password > try: > self.server.start() > self.server.subscribe("amqps://~0.0.0.0:12345") > if exception is not None: > assert False, "expected failure did not occur" > except MessengerException: > e = sys.exc_info()[1] > if exception: > assert exception in str(e), str(e) > else: > raise e > {code} > Hard coding the port sometimes leads to errors if port 12345 is already > bound. > {code} > File "./tests/python/proton-test", line 362, in run > phase() > File > "<http://mrg23.lab.bos.redhat.com:8080/job/proton-c-master-rhel-cxx/label=rhel7-64/ws/qpid-proton/tests/python/proton_tests/ssl.py",> > line 992, in test_client_credentials > self.server.subscribe("amqps://~0.0.0.0:12345") > File > "<http://mrg23.lab.bos.redhat.com:8080/job/proton-c-master-rhel-cxx/label=rhel7-64/ws/qpid-proton/proton-c/bindings/python/proton/__init__.py",> > line 496, in subscribe > self._check(pn_error_code(pn_messenger_error(self._mng))) > File > "<http://mrg23.lab.bos.redhat.com:8080/job/proton-c-master-rhel-cxx/label=rhel7-64/ws/qpid-proton/proton-c/bindings/python/proton/__init__.py",> > line 300, in _check > raise exc("[%s]: %s" % (err, > pn_error_text(pn_messenger_error(self._mng)))) > MessengerException: [-2]: CONNECTION ERROR (0.0.0.0:12345): bind: errno: 98 > proton_tests.ssl.MessengerSSLTests.test_client_credentials_bad_cert ..... fail > {code} > Remove all occurrences of hard coded ports in MessengerSSLTests -- This message was sent by Atlassian JIRA (v6.3.4#6332)