The generated python code for "oneway" methods calls flush() to send the data. The flush() method of THttpClient calls http_client.HTTPCconnection.getresponse(). This hangs forever waiting for a HTTP response from the server, unless a timeout has been specified, in which case the respective test simply fails. The reason for this is that the HTTP TestServer (C++) does not send a HTTP response for oneway messages (verified this using wireshark with the default "simple" server).
IMO this is in fact a bug of the TestServer, because the HTTP protocol specification clearly states that the server has to send "one ore more" HTTP response messages in reply to every request message (https://tools.ietf.org/html/rfc7230, 2.1).
However, the test suite for other languages (C++) works fine with this setup and fails with python.
Steps to reproduce:
- Build thrift with py support
- Run a HTTP test with cpp server and python client:
Result: the client hangs forever in the "testOneway" test. When killed with ctrl-c, it can be seen to hang in the following call stack:
Expected Result: Success.