Comment 19 for bug 405745

Revision history for this message
Cris Boylan (crispin-boylan) wrote :

after some chats in IRC we realised the 2 threads are main thread and server thread as there is no client.

AIX does not seem to like 2 threads trying operations on the socket at the same time (select and close). This causes the hang. The reason the socket is still there is because shutdown is returning ENOTCONN and not actually doing any shutting down.

replacing the code in TestingHTTPServerMixin.tearDown with (suggested by your good self on IRC):

         self._http_running = False

         temp_socket = socket.create_connection(self.socket.getsockname())
         temp_socket.close()

         # Let the server properly close the socket
         self.server_close()

now the results of bzr selftest -s bt.test_http -v:

----------------------------------------------------------------------
Ran 406 tests in 98.015s

OK
14 tests skipped
tests passed
bzrlib.tests.test_http.TestHttpTransportUrls.test_http_impl_urls(urllib) is leaking threads among 183 leaking tests.