diff --git a/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java b/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java index d267d16a19..06c22e9466 100644 --- a/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java +++ b/performance-test/backend/src/main/java/io/metersphere/service/PerformanceTestService.java @@ -590,9 +590,10 @@ public class PerformanceTestService { } public void copy(SaveTestPlanRequest request) { + LoadTestWithBLOBs copy = loadTestMapper.selectByPrimaryKey(request.getId()); + request.setProjectId(copy.getProjectId()); checkQuota(request, true); // copy test - LoadTestWithBLOBs copy = loadTestMapper.selectByPrimaryKey(request.getId()); String copyName = copy.getName() + " Copy"; if (StringUtils.length(copyName) > 30) { diff --git a/performance-test/frontend/src/business/test/PerformanceTestList.vue b/performance-test/frontend/src/business/test/PerformanceTestList.vue index d2f70deb1d..3b69ed2e54 100644 --- a/performance-test/frontend/src/business/test/PerformanceTestList.vue +++ b/performance-test/frontend/src/business/test/PerformanceTestList.vue @@ -291,6 +291,9 @@ export default { this.tableLoading = false; this.$success(this.$t('commons.copy_success')); this.search(); + }) + .catch(() => { + this.tableLoading = false; }); }, handleRun(test) {