WebUI 自动化在使用 pytest-xdist 多进程进行并发运行时经常出现以下两种报错(偶现,但偶现频率挺高的):

urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=53730): Max retries exceeded with url: /session/e4d27454c15a67c8963874d64793bba6/screenshot (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))


↙↙↙阅读原文可查看相关链接,并与作者交流