this is some logging meant to debug the mysterious

test failure we've been seeing
which so far has made the problem go away(!?!?)
😀😞 ¯\_(ツ)_/¯ 😞😀 ¯\_(ツ)_/¯ 😀😞 ¯\_(ツ)_/¯ 😞😀
here is the last time the failure happened:
https://travis-ci.org/internetarchive/warcprox/jobs/361409280
This commit is contained in:
Noah Levitt 2018-04-03 11:15:48 -07:00
parent e989b2f667
commit 08aada3ca9

View File

@ -315,9 +315,17 @@ def cert(request):
finally:
f.close()
class UhhhServer(http_server.HTTPServer):
def get_request(self):
try:
return self.socket.accept()
except:
logging.error('socket.accept() raised exception', exc_info=True)
raise
@pytest.fixture(scope="module")
def http_daemon(request):
http_daemon = http_server.HTTPServer(
http_daemon = UhhhServer(
('localhost', 0), RequestHandlerClass=_TestHttpRequestHandler)
logging.info('starting http://{}:{}'.format(http_daemon.server_address[0], http_daemon.server_address[1]))
http_daemon_thread = threading.Thread(name='HttpDaemonThread',