refactor(接口测试): 解决导入文件有缺失时系统报错问题
--user=郭雨琦 --bug=1015165 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015165
This commit is contained in:
parent
75ccfadae0
commit
89df13f552
|
@ -1090,6 +1090,16 @@ public class ApiDefinitionService {
|
||||||
|
|
||||||
JsonNode exApiResponse = null;
|
JsonNode exApiResponse = null;
|
||||||
JsonNode apiResponse = null;
|
JsonNode apiResponse = null;
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(apiDefinition.getResponse()) && StringUtils.isBlank(existApi.getResponse())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(apiDefinition.getResponse()) && StringUtils.isNotBlank(existApi.getResponse())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(apiDefinition.getResponse()) && StringUtils.isBlank(existApi.getResponse())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
exApiResponse = objectMapper.readTree(existApi.getResponse());
|
exApiResponse = objectMapper.readTree(existApi.getResponse());
|
||||||
apiResponse = objectMapper.readTree(apiDefinition.getResponse());
|
apiResponse = objectMapper.readTree(apiDefinition.getResponse());
|
||||||
|
|
Loading…
Reference in New Issue