diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java index 67af247760..78ae5d834e 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java @@ -55,6 +55,8 @@ public abstract class PostmanAbstractParserParser extends ApiImportAbstractPa } else { request.setFollowRedirects(true); } + request.setResponseTimeout("60000"); + request.setConnectTimeout("60000"); return request; } diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/api/HarParser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/api/HarParser.java index 56f28591d2..8edb4cd74e 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/api/HarParser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/api/HarParser.java @@ -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()); diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java index ea7db5d677..6bb30a49f4 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java @@ -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); diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java index 3e75440dd8..9fb259d9b2 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java @@ -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);