|
@@ -1,20 +1,19 @@
|
|
|
-package seecoder.devcloud.web.service.impl.APITest;
|
|
|
|
|
|
|
+package cn.seecoder.web.service.impl.APITest;
|
|
|
|
|
|
|
|
|
|
+import cn.seecoder.web.dao.APITest.APITestMapper;
|
|
|
|
|
+import cn.seecoder.web.model.po.APITest.APITestInfo;
|
|
|
|
|
+import cn.seecoder.web.model.po.APITest.APITestResult;
|
|
|
|
|
+import cn.seecoder.web.model.po.APITest.TestInfo;
|
|
|
|
|
+import cn.seecoder.web.model.po.APITest.TestResult;
|
|
|
|
|
+import cn.seecoder.web.model.vo.APITest.APITestBodyVO;
|
|
|
|
|
+import cn.seecoder.web.model.vo.APITest.APITestInfoVO;
|
|
|
|
|
+import cn.seecoder.web.model.vo.APITest.APITestResultVO;
|
|
|
|
|
+import cn.seecoder.web.service.APITest.APITestService;
|
|
|
import com.google.gson.Gson;
|
|
import com.google.gson.Gson;
|
|
|
import net.sf.json.JSONArray;
|
|
import net.sf.json.JSONArray;
|
|
|
import net.sf.json.JSONObject;
|
|
import net.sf.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
-import seecoder.devcloud.web.dao.APITest.APITestMapper;
|
|
|
|
|
-import seecoder.devcloud.web.model.po.APITest.APITestInfo;
|
|
|
|
|
-import seecoder.devcloud.web.model.po.APITest.APITestResult;
|
|
|
|
|
-import seecoder.devcloud.web.model.po.APITest.TestInfo;
|
|
|
|
|
-import seecoder.devcloud.web.model.po.APITest.TestResult;
|
|
|
|
|
-import seecoder.devcloud.web.model.vo.APITest.APITestBodyVO;
|
|
|
|
|
-import seecoder.devcloud.web.model.vo.APITest.APITestInfoVO;
|
|
|
|
|
-import seecoder.devcloud.web.model.vo.APITest.APITestResultVO;
|
|
|
|
|
-import seecoder.devcloud.web.model.vo.APITest.TestResultVO;
|
|
|
|
|
-import seecoder.devcloud.web.service.APITest.APITestService;
|
|
|
|
|
|
|
|
|
|
import java.io.BufferedReader;
|
|
import java.io.BufferedReader;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
@@ -31,8 +30,13 @@ import java.util.concurrent.CountDownLatch;
|
|
|
@Service
|
|
@Service
|
|
|
public class APITestServiceImpl implements APITestService {
|
|
public class APITestServiceImpl implements APITestService {
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ private final APITestMapper apiTestMapper;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private APITestMapper apiTestMapper;
|
|
|
|
|
|
|
+ public APITestServiceImpl(APITestMapper apiTestMapper) {
|
|
|
|
|
+ this.apiTestMapper = apiTestMapper;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -190,7 +194,7 @@ public class APITestServiceImpl implements APITestService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
- APITestServiceImpl apiTestService = new APITestServiceImpl();
|
|
|
|
|
|
|
+ APITestServiceImpl apiTestService = new APITestServiceImpl(apiTestMapper);
|
|
|
apiTestService.startTaskAllInOnce(10, task);
|
|
apiTestService.startTaskAllInOnce(10, task);
|
|
|
Integer max_time = Collections.max(timeList);
|
|
Integer max_time = Collections.max(timeList);
|
|
|
Integer min_time = Collections.min(timeList);
|
|
Integer min_time = Collections.min(timeList);
|