parent
836a4102db
commit
23709d0a94
|
@ -163,7 +163,6 @@ public class RunningAgentDB implements RunningAgentInterface {
|
|||
return this.getTestPlanScript();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RunningAgentInterface completeWithRunningScript(
|
||||
RunningScriptInterface runningScript) {
|
||||
this.setTestPlanScript((TestPlanScript) runningScript);
|
||||
|
@ -241,7 +240,6 @@ public class RunningAgentDB implements RunningAgentInterface {
|
|||
this.setHasSubstitute(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestBriefStatusModel briefAll() {
|
||||
if (this.isStoped()) {
|
||||
return null;
|
||||
|
|
|
@ -305,7 +305,6 @@ public class TestPlanScript implements RunningScriptInterface {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transient
|
||||
public Date getStartTime() {
|
||||
return this.getTestPlan().getCurrentStartTime();
|
||||
|
|
|
@ -204,7 +204,6 @@ public class TestPlanEngine implements TaskCompleteCallback,
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executePendingTestPlan() {
|
||||
pickATestPlan();
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ public class TestPlanLoadApplication implements Transaction {
|
|||
this.getHighAvailableAgentPool().checkAllHeartBeat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestPlanStatus execute() throws Exception {
|
||||
synchronized (this.highAvailableAgentPool) {
|
||||
if (!hasEnoughMaxLoad(this.getTestPlan().getRequiredLoad())) {
|
||||
|
@ -72,7 +71,6 @@ public class TestPlanLoadApplication implements Transaction {
|
|||
return TestPlanStatus.InRunning;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollBack() {
|
||||
for (TestPlanScript testPlanScript : this.getTestPlan()
|
||||
.getTestPlanScripts()) {
|
||||
|
|
|
@ -67,7 +67,6 @@ public class AgentMessengerImpl implements AgentMessenger {
|
|||
final int requiredLoad) {
|
||||
return this.executorService
|
||||
.submit(new Callable<RunScenarioResultModel>() {
|
||||
@Override
|
||||
public RunScenarioResultModel call() throws Exception {
|
||||
return bookTest(agent, requiredLoad);
|
||||
}
|
||||
|
@ -105,7 +104,6 @@ public class AgentMessengerImpl implements AgentMessenger {
|
|||
final ScheduleModel scheduleModel, final Date realStartDate) {
|
||||
return this.executorService
|
||||
.submit(new Callable<RunScenarioResultModel>() {
|
||||
@Override
|
||||
public RunScenarioResultModel call() throws Exception {
|
||||
return submitScenrioWithParams(agent, agentRunId,
|
||||
paramFiles, runScenarioModel, scheduleModel,
|
||||
|
@ -139,7 +137,6 @@ public class AgentMessengerImpl implements AgentMessenger {
|
|||
final UUID agentRunId) {
|
||||
return this.executorService
|
||||
.submit(new Callable<RunScenarioResultModel>() {
|
||||
@Override
|
||||
public RunScenarioResultModel call() throws Exception {
|
||||
return runWithParams(agent, agentRunId);
|
||||
}
|
||||
|
@ -175,7 +172,7 @@ public class AgentMessengerImpl implements AgentMessenger {
|
|||
final UUID runId) {
|
||||
return this.executorService
|
||||
.submit(new Callable<TestBriefStatusModel>() {
|
||||
@Override
|
||||
|
||||
public TestBriefStatusModel call() throws Exception {
|
||||
return scriptBriefAll(agent, runId);
|
||||
}
|
||||
|
@ -206,7 +203,6 @@ public class AgentMessengerImpl implements AgentMessenger {
|
|||
public Future<StopTestModel> stopAsync(final Agent agent, final UUID runId) {
|
||||
return this.executorService.submit(new Callable<StopTestModel>() {
|
||||
|
||||
@Override
|
||||
public StopTestModel call() throws Exception {
|
||||
return stop(agent, runId);
|
||||
}
|
||||
|
@ -235,7 +231,7 @@ public class AgentMessengerImpl implements AgentMessenger {
|
|||
|
||||
public Future<ServerStatusModel> getStatusAsync(final Agent agent) {
|
||||
return this.executorService.submit(new Callable<ServerStatusModel>() {
|
||||
@Override
|
||||
|
||||
public ServerStatusModel call() throws Exception {
|
||||
return getStatus(agent);
|
||||
}
|
||||
|
|
|
@ -337,7 +337,6 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerStatusModel queryAgentStatus(Agent agent) {
|
||||
return this.getAgentMessenger().getStatus(agent);
|
||||
}
|
||||
|
|
|
@ -23,12 +23,10 @@ public class HighAvailableImpl implements HighAvailablePool {
|
|||
.put(hostName, Agent.createAgentWithoutId(hostName, 6565, 500));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Agent> getPool() {
|
||||
return this.pool;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getMaxAvailableLoad() {
|
||||
Long result = 0L;
|
||||
for (Agent agent : this.pool.values()) {
|
||||
|
@ -37,7 +35,6 @@ public class HighAvailableImpl implements HighAvailablePool {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentAvailableLoad() {
|
||||
int result = 0;
|
||||
for (Agent agent : this.pool.values()) {
|
||||
|
@ -46,58 +43,48 @@ public class HighAvailableImpl implements HighAvailablePool {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAllHeartBeat() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkHeartBeat(Agent agent) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanUpAboutTestPlan(
|
||||
Collection<? extends RunningScriptInterface> runningScripts) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerStatusModel queryAgentStatus(Agent agent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(Agent agent) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObserver(CurrentLoadObserver currentLoadObserver) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<UUID, RunningAgentInterface> getAgentRunBlotters() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int blotterSize() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Agent agent) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RunningAgentInterface> applyFor(int load) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
|
|
@ -28,12 +28,12 @@ public class Mock_AgentMessenger implements AgentMessenger {
|
|||
|
||||
private UUID testId = UUID.randomUUID();
|
||||
|
||||
@Override
|
||||
|
||||
public RunScenarioResultModel bookTest(Agent agent, int requireLoad) {
|
||||
return new RunScenarioResultModel(this.testId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public RunScenarioResultModel submitScenrioWithParams(Agent agent,
|
||||
UUID agentRunId, List<File> paramFiles,
|
||||
RunScenarioModel runScenarioModel,
|
||||
|
@ -41,12 +41,12 @@ public class Mock_AgentMessenger implements AgentMessenger {
|
|||
return new RunScenarioResultModel(this.testId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public RunScenarioResultModel runWithParams(Agent agent, UUID agentRunId) {
|
||||
return new RunScenarioResultModel(this.testId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public TestBriefStatusModel scriptBriefAll(Agent agent, UUID runId) {
|
||||
if (isDead(agent)) {
|
||||
return null;
|
||||
|
@ -67,7 +67,7 @@ public class Mock_AgentMessenger implements AgentMessenger {
|
|||
return agent.getCurrentEnumStatus() == AgentStatus.BreakDown;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public StopTestModel stop(Agent agent, UUID runId) {
|
||||
// if (runId == this.testId) {
|
||||
// return new StopTestModel(true);
|
||||
|
@ -75,7 +75,7 @@ public class Mock_AgentMessenger implements AgentMessenger {
|
|||
return new StopTestModel(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public ServerStatusModel getStatus(Agent agent) {
|
||||
ServerStatusModel result = new ServerStatusModel();
|
||||
if (agent.getCurrentEnumStatus() == AgentStatus.InIdle) {
|
||||
|
@ -89,7 +89,7 @@ public class Mock_AgentMessenger implements AgentMessenger {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public Future<ServerStatusModel> getStatusAsync(Agent agent) {
|
||||
return new AsyncResult<ServerStatusModel>(getStatus(agent));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.springframework.stereotype.Component;
|
|||
@Component
|
||||
public class Mock_MonitorMessenger implements MonitorMessenger {
|
||||
|
||||
@Override
|
||||
public MonitorMain monitorModel(String hostName, int port) {
|
||||
MonitorMain result = new MonitorMain();
|
||||
result.setFinished(false);
|
||||
|
@ -27,27 +26,22 @@ public class Mock_MonitorMessenger implements MonitorMessenger {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalDiskModel physicalDisk(String hostName, int port) {
|
||||
return monitorModel(hostName, port).getPhysicalDiskModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MemoryModel memory(String hostName, int port) {
|
||||
return monitorModel(hostName, port).getMemoryModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProcessorModel processor(String hostName, int port) {
|
||||
return monitorModel(hostName, port).getProcessorModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public NetworkInterfaceModel networkInterface(String hostName, int port) {
|
||||
return monitorModel(hostName, port).getNetworkInterfaceModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProcessModel process(String hostName, int port) {
|
||||
return monitorModel(hostName, port).getProcessModel();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<meta charset="utf-8">
|
||||
|
|
Loading…
Reference in New Issue