fix(项目管理): 修复tcp-mock无法开启的问题
--bug=1023126 --user=宋天阳 【接口测试】开启 tcp mock 服务报错了 https://www.tapd.cn/55049933/s/1336772
This commit is contained in:
parent
aad6e26e8e
commit
20d7a57ea9
|
@ -20,6 +20,7 @@ import io.metersphere.log.vo.OperatingLogDetails;
|
|||
import io.metersphere.log.vo.system.SystemReference;
|
||||
import io.metersphere.request.AddProjectRequest;
|
||||
import io.metersphere.request.ProjectApplicationRequest;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -27,7 +28,6 @@ import org.springframework.context.annotation.Lazy;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
|
@ -178,12 +178,12 @@ public class ProjectApplicationService {
|
|||
|
||||
private void closeMockTcp(int tcpPort) {
|
||||
if (tcpPort != 0) {
|
||||
microService.getForData(MicroServiceName.API_TEST, "/mock/config/close/tcp/" + tcpPort);
|
||||
microService.getForData(MicroServiceName.API_TEST, "/mock-config/close/tcp/" + tcpPort);
|
||||
}
|
||||
}
|
||||
|
||||
private void createTcp(Integer mockPort) {
|
||||
microService.getForData(MicroServiceName.API_TEST, "/mock/config/open/tcp/" + mockPort);
|
||||
microService.getForData(MicroServiceName.API_TEST, "/mock-config/open/tcp/" + mockPort);
|
||||
}
|
||||
|
||||
private void reloadMockTcp(Project project, int oldPort) {
|
||||
|
@ -428,6 +428,7 @@ public class ProjectApplicationService {
|
|||
private void doHandleTestCaseCustomNum(String projectId) {
|
||||
microService.getForData(MicroServiceName.TEST_TRACK, "/test/case/update/custom/num/" + projectId);
|
||||
}
|
||||
|
||||
public void deleteRelateProjectConfig(String projectId) {
|
||||
ProjectApplicationExample example = new ProjectApplicationExample();
|
||||
example.createCriteria().andProjectIdEqualTo(projectId);
|
||||
|
|
Loading…
Reference in New Issue