Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曹鹏
bigdatainterservice
Commits
a6cb577a
Commit
a6cb577a
authored
Mar 21, 2019
by
caojingji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网安接口稳定性测试完毕,删除测试线程
parent
bd8d6ca1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
56 deletions
+0
-56
src/main/java/com/founder/interservice/regionalanalysis/service/impl/TestSendTask.java
+0
-56
No files found.
src/main/java/com/founder/interservice/regionalanalysis/service/impl/TestSendTask.java
deleted
100644 → 0
View file @
bd8d6ca1
package
com
.
founder
.
interservice
.
regionalanalysis
.
service
.
impl
;
import
com.founder.interservice.util.HttpUtil
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Random
;
import
static
com
.
founder
.
interservice
.
util
.
PropertieUtil
.
writeProperties
;
@Component
@Async
public
class
TestSendTask
{
@Value
(
value
=
"${wabigdata.regionalAnalysisTask.url}"
)
private
String
REGION_ALANALYSIS_URL
;
//发送任务接口
@Value
(
value
=
"${wabigdata.trackTravelTogetherForPhoneTask.url}"
)
private
String
TOGETHER_TASK_URL
;
/*@Scheduled(initialDelay = 2000,fixedDelay = 300000) //项目启动后两秒开始执行一次 每个五分钟执行一次
public void doTestTogetherSendTask(){
System.out.println("测试伴随线程开始执行");
long day1 = System.currentTimeMillis();
String taskId = null;
String name = "T"+new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒").format(new Date());
try{
String url = TOGETHER_TASK_URL + "&objectType=" + "4314"
+ "&objectValue=" + "460029789430171"
+ "&taskName="+"测试伴随任务"
+ "&taskCaseId=" + "A5001231231234234"
+ "&startTime=" + System.currentTimeMillis()
+ "&endTime=" + System.currentTimeMillis();
taskId = HttpUtil.getWaData(url);
String logValue = null;
if("Rate Limit".equals(taskId.trim()) || "null".equals(taskId)){
logValue="伴随任务:任务状态:FAIL;任务编号:"+taskId+";用时"+(System.currentTimeMillis()-day1+"毫秒");
}else if(taskId == null || "".equals(taskId)){
logValue="伴随任务:任务状态:TIMEOUT;任务编号:"+taskId+";用时"+(System.currentTimeMillis()-day1+"毫秒");
}else{
logValue="伴随任务:任务状态:SUCCESS;任务编号:"+taskId+";用时"+(System.currentTimeMillis()-day1+"毫秒");
}
writeProperties("TogetherTaskLogFile.properties", name, logValue);
}catch (Exception e){
try{
e.printStackTrace();
String logValue="伴随任务:任务状态:TIMEOUT;任务编号:null;用时"+(System.currentTimeMillis()-day1+"毫秒");
writeProperties("TogetherTaskLogFile.properties", name, logValue);
}catch (Exception e1){
e1.printStackTrace();
}
}
}*/
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment