Commit cc73d18d by 钱炳权

测试信息开发完成

parent 10fb02a4
...@@ -79,6 +79,8 @@ public class aroundAop implements Ordered { ...@@ -79,6 +79,8 @@ public class aroundAop implements Ordered {
throw new MysqlException("Kitty start backup failed!"); throw new MysqlException("Kitty start backup failed!");
} }
SystemRunningParams.testTimeMessage.get("kitty").put("start", System.currentTimeMillis()); SystemRunningParams.testTimeMessage.get("kitty").put("start", System.currentTimeMillis());
System.out.println("**************1**********");
System.out.println(SystemRunningParams.testTimeMessage.get("kitty").put("start", System.currentTimeMillis()));
/*放行方法*/ /*放行方法*/
try { try {
result = point.proceed(); result = point.proceed();
...@@ -90,23 +92,23 @@ public class aroundAop implements Ordered { ...@@ -90,23 +92,23 @@ public class aroundAop implements Ordered {
if (function == null || "".equals(function)) { if (function == null || "".equals(function)) {
throw new AflnetException("There is no value in function!"); throw new AflnetException("There is no value in function!");
} }
if ("startBackup".equals(function)) { /*存入kitty结束时的任务信息*/
/*存入kitty结束时的任务信息*/ try {
try { SystemRunningParams.testTimeMessage.get("kitty").put("end", System.currentTimeMillis());
SystemRunningParams.testTimeMessage.get("kitty").put("end", System.currentTimeMillis()); System.out.println(SystemRunningParams.testTimeMessage.get("kitty").put("end", System.currentTimeMillis()));
int missionId = SystemRunningParams.kittyMissionId; int missionId = SystemRunningParams.kittyMissionId;
Long runTime = SystemRunningParams.testTimeMessage.get("kitty").get("end") - SystemRunningParams.testTimeMessage.get("kitty").get("start"); Long runTime = SystemRunningParams.testTimeMessage.get("kitty").get("end") - SystemRunningParams.testTimeMessage.get("kitty").get("start");
GlobalClass.missionInfoMapper.updateMission(MissionStateEnum.DONE.getStateCode(), runTime, missionId);//更新该次任务的执行时间; System.out.println("MissionId :" + missionId);
} catch (Exception e) { GlobalClass.missionInfoMapper.updateMission(MissionStateEnum.DONE.getStateCode(), runTime, missionId);//更新该次任务的执行时间;
e.printStackTrace(); } catch (Exception e) {
throw new MysqlException("Kitty start backup failed!"); e.printStackTrace();
} throw new MysqlException("Kitty start backup failed!");
} }
} }
if (result == null) { if (result == null) {
throw new KittyException("Result is null!"); throw new KittyException("Result is null!");
} }
System.out.println(result);
return (Map<String, List<String>>) result; return (Map<String, List<String>>) result;
} }
......
...@@ -111,7 +111,7 @@ public class beforeAop implements Ordered{ ...@@ -111,7 +111,7 @@ public class beforeAop implements Ordered{
} }
/*存入压缩包*/ /*存入压缩包*/
while (files.contains(fileZipName) && flag == 0) {//当前存在压缩包,且没有存过才存入,循环是等待压缩完成 todo 感觉这里后期会出现问题 while (files.contains(fileZipName) && flag == 0) {//当前存在压缩包,且没有存过才存入,循环是等待压缩完成 todo 感觉这里后期会出现问题
flag = aflnetPersistenceService.aflnetResultBackup(fileZipName, 0, flag = aflnetPersistenceService.aflnetResultBackup(fileZipName, MissionStateEnum.DONE.getStateCode(),
SystemRunningParams.testTimeMessage.get("aflnet").get("end") - SystemRunningParams.testTimeMessage.get("aflnet").get("start")); SystemRunningParams.testTimeMessage.get("aflnet").get("end") - SystemRunningParams.testTimeMessage.get("aflnet").get("start"));
} }
/*清除生成的文件*/ /*清除生成的文件*/
...@@ -133,27 +133,7 @@ public class beforeAop implements Ordered{ ...@@ -133,27 +133,7 @@ public class beforeAop implements Ordered{
} }
} }
private void kitty(String function) {
//todo 四种测试无法同时运行,因为只存了一个missionName
if (function == null || "".equals(function)) {
throw new AflnetException("There is no value in function!");
}
if ("startBackup".equals(function)) {
/*存入kitty启动时的任务信息*/
try {
int missionId = GlobalClass.missionInfoMapper.selectTopMissionId() + 1;
SystemRunningParams.kittyMissionId = missionId;
GlobalClass.missionInfoMapper.insertMission(new MissionInfo(missionId, TableClassEnum.KITTY_RESULT.getTableId(), new Date(), SystemRunningParams.kittyData.get("missionName"),
MissionStateEnum.RUNNING.getStateCode(), 0L));
} catch (Exception e) {
e.printStackTrace();
throw new MysqlException("Kitty start backup failed!");
}
}
// }else if("afterBackup".equals(function)){
//
// }
}
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment