fix(接口测试): 修复swagger、postman、har格式导入的接口没有超时时间问题
--bug=1022544 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001022544
This commit is contained in:
parent
be1c4e1ffb
commit
2bea883de7
|
@ -55,6 +55,8 @@ public abstract class PostmanAbstractParserParser<T> extends ApiImportAbstractPa
|
|||
} else {
|
||||
request.setFollowRedirects(true);
|
||||
}
|
||||
request.setResponseTimeout("60000");
|
||||
request.setConnectTimeout("60000");
|
||||
return request;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,8 @@ public class HarParser extends HarAbstractParser {
|
|||
if (harRequest != null) {
|
||||
MsHTTPSamplerProxy request = super.buildRequest(reqName, url, harRequest.method, null);
|
||||
request.setFollowRedirects(true);
|
||||
request.setResponseTimeout("60000");
|
||||
request.setConnectTimeout("60000");
|
||||
ApiDefinitionWithBLOBs apiDefinition = super.buildApiDefinition(request.getId(), reqName, url, harRequest.method, importRequest);
|
||||
parseParameters(harRequest, request);
|
||||
parseRequestBody(harRequest, request.getBody());
|
||||
|
|
|
@ -140,6 +140,8 @@ public class Swagger2Parser extends SwaggerAbstractParser {
|
|||
Operation operation = operationMap.get(method);
|
||||
MsHTTPSamplerProxy request = buildRequest(operation, pathName, method.name());
|
||||
request.setFollowRedirects(true);
|
||||
request.setResponseTimeout("60000");
|
||||
request.setConnectTimeout("60000");
|
||||
ApiDefinitionWithBLOBs apiDefinition = buildApiDefinition(request.getId(), operation, pathName, method.name(), importRequest);
|
||||
apiDefinition.setDescription(operation.getDescription());
|
||||
parseParameters(operation, request);
|
||||
|
|
|
@ -151,6 +151,8 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
|||
if (operation != null) {
|
||||
MsHTTPSamplerProxy request = buildRequest(operation, pathName, method);
|
||||
request.setFollowRedirects(true);
|
||||
request.setResponseTimeout("60000");
|
||||
request.setConnectTimeout("60000");
|
||||
ApiDefinitionWithBLOBs apiDefinition = buildApiDefinition(request.getId(), operation, pathName, method, importRequest);
|
||||
apiDefinition.setDescription(operation.getDescription());
|
||||
parseParameters(operation, request);
|
||||
|
|
Loading…
Reference in New Issue