我已经尝试了以下。
通过代码增加连接时间
RestAssuredConfig newConfig = RestAssured.config() .httpClient(HttpClientConfig.httpClientConfig().setParam(CoreConnectionPNames.CONNECTION_TIMEOUT, 12000).setParam(CoreConnectionPNames.SO_TIMEOUT, 12000))。
在请求头中添加了User-Agent
从本地系统和远程代理手动检查相同的api调用,结果都一样。
但是我得到了java.net.SocketTimeoutException: connect timed out while it is working from local system and not from Teamcity agent execution。
请帮忙