Message271309
I don’t understand why we have so many tests that assign the server port in the server thread, and then use some sort of synchronization to get it to the client thread. IMO it would be simpler in this case to do something like:
def setUp(self):
serv = DOCXMLRPCServer(...)
self.addCleanup(serv.server_close)
[_, PORT] = serv.server_address # Eliminates “ready“ event
# Other server setup here
thread = threading.Thread(target=serv.serve_forever)
thread.start()
self.addCleanup(thread.join) # Instead of self.evt
self.addCleanup(serv.shutdown)
self.client = httplib.HTTPConnection("localhost:%d" % PORT)
self.addCleanup(self.client.close) |
|
Date |
User |
Action |
Args |
2016-07-26 00:17:50 | martin.panter | set | recipients:
+ martin.panter, earl.chew |
2016-07-26 00:17:50 | martin.panter | set | messageid: <1469492270.71.0.0462390669055.issue27614@psf.upfronthosting.co.za> |
2016-07-26 00:17:50 | martin.panter | link | issue27614 messages |
2016-07-26 00:17:46 | martin.panter | create | |
|