fix(性能测试): 修复性能测试复制时名称长度超过限制的bug
This commit is contained in:
parent
dd481c7cfd
commit
56fe5fe5e8
|
@ -448,8 +448,14 @@ public class PerformanceTestService {
|
|||
checkQuota(request, true);
|
||||
// copy test
|
||||
LoadTestWithBLOBs copy = loadTestMapper.selectByPrimaryKey(request.getId());
|
||||
String copyName = copy.getName() + " Copy";
|
||||
|
||||
if (StringUtils.length(copyName) > 30) {
|
||||
MSException.throwException(Translator.get("load_test_name_length"));
|
||||
}
|
||||
|
||||
copy.setId(UUID.randomUUID().toString());
|
||||
copy.setName(copy.getName() + " Copy");
|
||||
copy.setName(copyName);
|
||||
copy.setCreateTime(System.currentTimeMillis());
|
||||
copy.setUpdateTime(System.currentTimeMillis());
|
||||
copy.setStatus(APITestStatus.Saved.name());
|
||||
|
|
|
@ -42,6 +42,7 @@ cannot_edit_load_test_running=Cannot modify the running test
|
|||
test_not_found=Test cannot be found:
|
||||
test_not_running=Test is not running
|
||||
load_test_already_exists=Duplicate load test name
|
||||
load_test_name_length=The length of the test name exceeds the limit
|
||||
no_nodes_message=No node message
|
||||
duplicate_node_ip=Duplicate IPs
|
||||
duplicate_node_port=Duplicate Ports
|
||||
|
|
|
@ -42,6 +42,7 @@ cannot_edit_load_test_running=不能修改正在运行的测试
|
|||
test_not_found=测试不存在:
|
||||
test_not_running=测试未运行
|
||||
load_test_already_exists=测试名称不能重复
|
||||
load_test_name_length=测试名称长度超过限制
|
||||
no_nodes_message=没有节点信息
|
||||
duplicate_node_ip=节点 IP 重复
|
||||
duplicate_node_port=节点 Port 重复
|
||||
|
|
|
@ -42,6 +42,7 @@ cannot_edit_load_test_running=不能修改正在運行的測試
|
|||
test_not_found=測試不存在:
|
||||
test_not_running=測試未運行
|
||||
load_test_already_exists=測試名稱不能重復
|
||||
load_test_name_length=測試名稱長度超過限制
|
||||
no_nodes_message=沒有節點信息
|
||||
duplicate_node_ip=節點 IP 重復
|
||||
duplicate_node_port=節點 Port 重復
|
||||
|
|
Loading…
Reference in New Issue