From 2f54200f6839a2af7380315d1e643a0c4f76bbfe Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 21 Sep 2023 21:14:47 +0800 Subject: [PATCH] ci: spring boot version --- .../api/controller/ApiDefinitionControllerTests.java | 2 +- .../io/metersphere/api/controller/CleanupResourceTests.java | 2 +- .../java/io/metersphere/api/controller/EventSourceTests.java | 2 +- .../io/metersphere/api/controller/PluginSubTypeTests.java | 2 +- .../java/io/metersphere/bug/controller/BugControllerTest.java | 2 +- .../io/metersphere/bug/controller/CleanupResourceTests.java | 2 +- .../functional/controller/CaseReviewControllerTests.java | 2 +- .../functional/controller/CleanupResourceTests.java | 2 +- .../project/controller/CleanupEnvironmentTests.java | 2 +- .../project/controller/CleanupRobotResourceTests.java | 2 +- .../project/controller/CreateRobotResourceTests.java | 2 +- .../project/controller/EnvironmentControllerTests.java | 2 +- .../project/controller/GlobalParamsControllerTests.java | 2 +- .../project/controller/NoticeMessageTaskControllerTests.java | 2 +- .../project/controller/NoticeTemplateControllerTests.java | 2 +- .../project/controller/ProjectApplicationControllerTests.java | 2 +- .../project/controller/ProjectControllerTests.java | 2 +- .../project/controller/ProjectLogControllerTests.java | 2 +- .../project/controller/ProjectMemberControllerTests.java | 2 +- .../project/controller/ProjectRobotControllerTests.java | 2 +- .../project/controller/ProjectUserRoleControllerTests.java | 2 +- .../project/controller/ProjectVersionResourceTests.java | 2 +- .../filemanagement/FileManagementControllerTests.java | 2 +- .../FileManagementPermissionControllerTests.java | 2 +- .../src/test/java/io/metersphere/system/base/BaseTest.java | 2 +- .../system/controller/AuthSourceControllerTests.java | 2 +- .../system/controller/BaseDisplayControllerTests.java | 2 +- .../metersphere/system/controller/CleanupResourceTests.java | 2 +- .../io/metersphere/system/controller/CommonParamTests.java | 2 +- .../io/metersphere/system/controller/CreateResourceTests.java | 2 +- .../io/metersphere/system/controller/FileCenterTests.java | 2 +- .../system/controller/GlobalUserRoleControllerTests.java | 2 +- .../controller/GlobalUserRoleRelationControllerTests.java | 2 +- .../metersphere/system/controller/LicenseControllerTests.java | 2 +- .../system/controller/OperationLogControllerTests.java | 2 +- .../system/controller/OrganizationControllerTests.java | 2 +- .../controller/OrganizationCustomFieldControllerTests.java | 2 +- .../system/controller/OrganizationLogControllerTests.java | 2 +- .../system/controller/OrganizationProjectControllerTests.java | 2 +- .../controller/OrganizationTemplateControllerTests.java | 2 +- .../controller/OrganizationUserRoleControllerTests.java | 2 +- .../metersphere/system/controller/PluginControllerTests.java | 2 +- .../system/controller/ServiceIntegrationControllerTests.java | 2 +- .../system/controller/SystemOrganizationControllerTests.java | 2 +- .../system/controller/SystemParameterControllerTests.java | 2 +- .../system/controller/SystemProjectControllerTests.java | 2 +- .../system/controller/SystemVersionControllerTests.java | 2 +- .../io/metersphere/system/controller/TestRIdGenerator.java | 2 +- .../system/controller/TestResourcePoolControllerTests.java | 2 +- .../system/controller/user/UserControllerPermissionTests.java | 2 +- .../system/controller/user/UserControllerTests.java | 2 +- .../io/metersphere/system/job/CleanOrganizationJobTests.java | 2 +- .../java/io/metersphere/system/job/CleanProjectJobTests.java | 2 +- .../io/metersphere/system/job/CleanUserInviteJobTests.java | 2 +- .../io/metersphere/plan/controller/CleanupResourceTests.java | 2 +- .../io/metersphere/plan/controller/EventListenerTests.java | 2 +- .../plan/controller/TestPlanApiCaseControllerTests.java | 2 +- .../metersphere/plan/controller/TestPlanControllerTests.java | 2 +- pom.xml | 4 ++-- 59 files changed, 60 insertions(+), 60 deletions(-) diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionControllerTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionControllerTests.java index b45d80fa00..ab6cd39cc7 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionControllerTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDefinitionControllerTests.java @@ -21,7 +21,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class ApiDefinitionControllerTests { diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/CleanupResourceTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/CleanupResourceTests.java index 81c541b8b0..5737372fd7 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/CleanupResourceTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/CleanupResourceTests.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CleanupResourceTests { diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/EventSourceTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/EventSourceTests.java index 055d87166c..a42bf6a935 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/EventSourceTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/EventSourceTests.java @@ -13,7 +13,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class EventSourceTests { diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java index c484b324f9..698c773ae7 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java @@ -12,7 +12,7 @@ import org.springframework.boot.test.context.SpringBootTest; import java.util.LinkedList; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class PluginSubTypeTests { diff --git a/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java b/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java index d3cd680fc1..ed33bc3281 100644 --- a/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java +++ b/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/BugControllerTest.java @@ -20,7 +20,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class BugControllerTest { diff --git a/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/CleanupResourceTests.java b/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/CleanupResourceTests.java index 7b16d9606d..94fefae826 100644 --- a/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/CleanupResourceTests.java +++ b/backend/services/bug-management/src/test/java/io/metersphere/bug/controller/CleanupResourceTests.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CleanupResourceTests { diff --git a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java index 462987dae0..6213902880 100644 --- a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java +++ b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java @@ -20,7 +20,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class CaseReviewControllerTests { diff --git a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CleanupResourceTests.java b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CleanupResourceTests.java index 8bf968d441..d237e5dbc5 100644 --- a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CleanupResourceTests.java +++ b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CleanupResourceTests.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CleanupResourceTests { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java index 3866606d52..d6d651d914 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupEnvironmentTests.java @@ -12,7 +12,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CleanupEnvironmentTests { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java index 996f9025e0..e87639c804 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CleanupRobotResourceTests.java @@ -26,7 +26,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CleanupRobotResourceTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java index cd128cf230..96adabf85a 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/CreateRobotResourceTests.java @@ -23,7 +23,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CreateRobotResourceTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java index a4e48bf064..1f554f656a 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/EnvironmentControllerTests.java @@ -69,7 +69,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class EnvironmentControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java index 895f2ec6d1..ecf3836aa2 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/GlobalParamsControllerTests.java @@ -36,7 +36,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class GlobalParamsControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java index c9839a3d30..0fe13f5f9b 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeMessageTaskControllerTests.java @@ -30,7 +30,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class NoticeMessageTaskControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeTemplateControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeTemplateControllerTests.java index 135495f97b..9302152423 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeTemplateControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/NoticeTemplateControllerTests.java @@ -21,7 +21,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class NoticeTemplateControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java index 3a22628292..a2ad3c3277 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java @@ -37,7 +37,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class ProjectApplicationControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java index f77d2002a7..59afa5e431 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectControllerTests.java @@ -37,7 +37,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class ProjectControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java index b2e0e16c5b..f7ea2a8ad9 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectLogControllerTests.java @@ -14,7 +14,7 @@ import org.springframework.boot.test.context.SpringBootTest; import java.util.Arrays; import java.util.HashMap; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class ProjectLogControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java index 63a8cf8d96..a6c12cfc2c 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectMemberControllerTests.java @@ -29,7 +29,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class ProjectMemberControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java index b29f97f122..c26d6e9f29 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectRobotControllerTests.java @@ -27,7 +27,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class ProjectRobotControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java index f6afbfbcfe..6efd0de6cb 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectUserRoleControllerTests.java @@ -40,7 +40,7 @@ import static io.metersphere.system.controller.handler.result.CommonResultCode.I import static io.metersphere.system.controller.result.SystemResultCode.NO_PROJECT_USER_ROLE_PERMISSION; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class ProjectUserRoleControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectVersionResourceTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectVersionResourceTests.java index e6703762b2..7e6bb620d7 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectVersionResourceTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectVersionResourceTests.java @@ -13,7 +13,7 @@ import org.springframework.boot.test.context.SpringBootTest; import java.util.List; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class ProjectVersionResourceTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementControllerTests.java index 2787eda8ca..3b1ba40d19 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementControllerTests.java @@ -40,7 +40,7 @@ import java.util.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class FileManagementControllerTests extends BaseTest { diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementPermissionControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementPermissionControllerTests.java index ea3d7e62c8..d86ca1601d 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementPermissionControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/filemanagement/FileManagementPermissionControllerTests.java @@ -22,7 +22,7 @@ import org.springframework.util.MultiValueMap; import java.util.ArrayList; import java.util.Objects; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class FileManagementPermissionControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/base/BaseTest.java b/backend/services/system-setting/src/test/java/io/metersphere/system/base/BaseTest.java index 57b08c994b..fc53c47c5b 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/base/BaseTest.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/base/BaseTest.java @@ -55,7 +55,7 @@ import java.util.function.Supplier; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public abstract class BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java index d1de0eae1b..c2968524c8 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/AuthSourceControllerTests.java @@ -37,7 +37,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class AuthSourceControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java index 43144c1290..aef9df5482 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/BaseDisplayControllerTests.java @@ -22,7 +22,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class BaseDisplayControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java index db95751f89..fb7f688cb0 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CleanupResourceTests.java @@ -12,7 +12,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CleanupResourceTests { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java index 98cc42f5d1..e0625ac075 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CommonParamTests.java @@ -13,7 +13,7 @@ import org.springframework.test.web.servlet.MvcResult; import java.util.HashMap; import java.util.Map; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) class CommonParamTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java index ceb90cc6a2..3e7734caa8 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/CreateResourceTests.java @@ -12,7 +12,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CreateResourceTests { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/FileCenterTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/FileCenterTests.java index eee0680296..92e76d2c26 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/FileCenterTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/FileCenterTests.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; import org.springframework.mock.web.MockMultipartFile; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class FileCenterTests { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java index f0bd1d694d..eb999e7e65 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleControllerTests.java @@ -40,7 +40,7 @@ import static io.metersphere.system.controller.result.SystemResultCode.GLOBAL_US import static io.metersphere.system.controller.result.SystemResultCode.GLOBAL_USER_ROLE_PERMISSION; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) class GlobalUserRoleControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java index 6409cbae5a..26d214935c 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/GlobalUserRoleRelationControllerTests.java @@ -41,7 +41,7 @@ import static io.metersphere.system.controller.handler.result.CommonResultCode.U import static io.metersphere.system.controller.handler.result.MsHttpResultCode.NOT_FOUND; import static io.metersphere.system.controller.result.SystemResultCode.*; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) class GlobalUserRoleRelationControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/LicenseControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/LicenseControllerTests.java index 2965921f22..f120a03667 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/LicenseControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/LicenseControllerTests.java @@ -22,7 +22,7 @@ import java.nio.charset.StandardCharsets; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class LicenseControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java index db5e7df288..719505a32f 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OperationLogControllerTests.java @@ -18,7 +18,7 @@ import java.util.Arrays; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OperationLogControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java index dd09a6aa7d..0bb8bd96df 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationControllerTests.java @@ -34,7 +34,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OrganizationControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java index e4cc6a999d..5fe58e0870 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationCustomFieldControllerTests.java @@ -37,7 +37,7 @@ import static io.metersphere.system.controller.handler.result.MsHttpResultCode.N * @author jianxing * @date : 2023-8-29 */ -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OrganizationCustomFieldControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java index 337d88e08b..491a77a63b 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationLogControllerTests.java @@ -14,7 +14,7 @@ import org.springframework.boot.test.context.SpringBootTest; import java.util.Arrays; import java.util.HashMap; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OrganizationLogControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java index 3d8cf9b874..fff3cb12e3 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java @@ -50,7 +50,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OrganizationProjectControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java index 54c09c1cbd..075148ad28 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationTemplateControllerTests.java @@ -39,7 +39,7 @@ import static io.metersphere.system.controller.handler.result.MsHttpResultCode.N * @author jianxing * @date : 2023-8-30 */ -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OrganizationTemplateControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java index 07cd98b8d8..66bf02ac39 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationUserRoleControllerTests.java @@ -39,7 +39,7 @@ import static io.metersphere.system.controller.handler.result.CommonResultCode.I import static io.metersphere.system.controller.result.SystemResultCode.NO_ORG_USER_ROLE_PERMISSION; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OrganizationUserRoleControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java index cab9238b94..5646b8c44c 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/PluginControllerTests.java @@ -38,7 +38,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author jianxing * @date : 2023-7-14 */ -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class PluginControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java index 911a8d9a30..b1ed7d8d7b 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/ServiceIntegrationControllerTests.java @@ -48,7 +48,7 @@ import static org.mockserver.model.HttpResponse.response; * @author jianxing * @date : 2023-8-9 */ -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class ServiceIntegrationControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java index 0eda4f1499..c8d5299e14 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemOrganizationControllerTests.java @@ -32,7 +32,7 @@ import java.util.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class SystemOrganizationControllerTests extends BaseTest{ diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java index 602e069ef1..5ce7fd740a 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemParameterControllerTests.java @@ -24,7 +24,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class SystemParameterControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java index 48c3d2594d..27cb603e6b 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java @@ -47,7 +47,7 @@ import java.util.List; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class SystemProjectControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java index 0abf8b8c66..0ea680b7b5 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemVersionControllerTests.java @@ -16,7 +16,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class SystemVersionControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestRIdGenerator.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestRIdGenerator.java index ad06b97732..ecc640e072 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestRIdGenerator.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestRIdGenerator.java @@ -10,7 +10,7 @@ import org.redisson.api.RIdGenerator; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class TestRIdGenerator { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java index 9edb77162e..e989beac97 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/TestResourcePoolControllerTests.java @@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) class TestResourcePoolControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java index e64d0b4778..f1db8bbe24 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerPermissionTests.java @@ -25,7 +25,7 @@ import java.util.List; import java.util.Objects; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class UserControllerPermissionTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java index cfb6eb7852..593fe2437c 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java @@ -52,7 +52,7 @@ import java.util.stream.Collectors; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class UserControllerTests extends BaseTest { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanOrganizationJobTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanOrganizationJobTests.java index 32aafe0cb5..ef5a9074a1 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanOrganizationJobTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanOrganizationJobTests.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.SqlConfig; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class CleanOrganizationJobTests { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanProjectJobTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanProjectJobTests.java index 7ab140a6a2..f33b037649 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanProjectJobTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanProjectJobTests.java @@ -9,7 +9,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.SqlConfig; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class CleanProjectJobTests { diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanUserInviteJobTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanUserInviteJobTests.java index 956c07a7dd..4eedf873f8 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanUserInviteJobTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/job/CleanUserInviteJobTests.java @@ -7,7 +7,7 @@ import org.junit.jupiter.api.TestMethodOrder; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class CleanUserInviteJobTests { diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/CleanupResourceTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/CleanupResourceTests.java index 42862a3bbb..2406c5fc0f 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/CleanupResourceTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/CleanupResourceTests.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class CleanupResourceTests { diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/EventListenerTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/EventListenerTests.java index d4b80e8068..dad5bc0a8c 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/EventListenerTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/EventListenerTests.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock import org.springframework.boot.test.context.SpringBootTest; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class EventListenerTests { diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java index 2cca9c1254..d8c93569be 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanApiCaseControllerTests.java @@ -7,7 +7,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.SqlConfig; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @Sql(scripts = {"/ddl/test_plan_api_case.sql"}, diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java index 95eb701dd0..edfd0784f1 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java @@ -25,7 +25,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@SpringBootTest +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class TestPlanControllerTests { diff --git a/pom.xml b/pom.xml index 04dc26a54f..86799f0ee0 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.3 + 3.1.4 @@ -145,7 +145,7 @@ org.springframework.cloud spring-cloud-starter-bootstrap - 4.0.2 + 4.0.4 test