Github user jsirois commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/850#discussion_r52765229
  
    --- Diff: lib/py/test/test_sslsocket.py ---
    @@ -75,185 +104,176 @@ def __exit__(self, exc_type, exc_value, traceback):
     
     
     class TSSLSocketTest(unittest.TestCase):
    -    def _assert_connection_failure(self, server, client):
    +    def _server_socket(self, **kwargs):
    +        return TSSLServerSocket(port=0, **kwargs)
    +
    +    @contextmanager
    +    def _connectable_client(self, server, path=None, **client_kwargs):
             acc = ServerAcceptor(server)
             try:
                 acc.start()
    -            time.sleep(CONNECT_DELAY / 2)
    -            client.setTimeout(CONNECT_TIMEOUT / 2)
    -            with self._assert_raises(Exception):
    -                logging.disable(logging.CRITICAL)
    -                client.open()
    -                select.select([], [client.handle], [], CONNECT_TIMEOUT / 2)
    -            # self.assertIsNone(acc.client)
    -            self.assertTrue(acc.client is None)
    +            acc.await_listening()
    --- End diff --
    
    Its needed for the unix domain socket case which binds no port, but must 
wait for the server to be up and listening.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to