remove a bug for ms to s

remove a bug for ms to s
:from milisecond to second
This commit is contained in:
coderfengyun 2014-09-04 15:02:53 +08:00
parent 5390aa5c05
commit 0f29deb274
3 changed files with 7 additions and 8 deletions

View File

@ -205,9 +205,8 @@ public class TestPlanScript implements RunningScriptInterface {
return false; return false;
} }
Timer timer = new Timer(); Timer timer = new Timer();
ExecutionOverTask executionOverTask = new ExecutionOverTask(this); timer.schedule(new ExecutionOverTask(this),
timer.schedule(executionOverTask, (testScriptConfig.getExecuteRange()) (testScriptConfig.getExecuteRange()));
* SECOND_MILISECOND_UNIT_CONVERSION);
return true; return true;
} }

View File

@ -44,7 +44,6 @@ import org.bench4q.share.models.master.RunningScriptModel;
import org.bench4q.share.models.master.TestPlanModel; import org.bench4q.share.models.master.TestPlanModel;
import org.bench4q.share.models.master.statistics.ScriptResultModel; import org.bench4q.share.models.master.statistics.ScriptResultModel;
import org.bench4q.share.models.monitor.MonitorMain; import org.bench4q.share.models.monitor.MonitorMain;
import org.python.antlr.PythonParser.return_stmt_return;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -159,7 +158,7 @@ public class TestPlanFactory {
// filter the script // filter the script
Script script = this.getScriptService().getScript(scriptId); Script script = this.getScriptService().getScript(scriptId);
testPlanScript.setFilteredScriptCnt(createAScriptWithFilter( testPlanScript.setFilteredScriptCnt(createAScriptWithFilter(
scriptFilterOptionsModel,script.getScriptContent())); scriptFilterOptionsModel, script.getScriptContent()));
testPlanScript.setScript(script); testPlanScript.setScript(script);
testPlanScript.setPlanedConfig(createAPlanedConfigWithoutId(config)); testPlanScript.setPlanedConfig(createAPlanedConfigWithoutId(config));
testPlanScript.setTestPlan(testPlanDB); testPlanScript.setTestPlan(testPlanDB);
@ -167,8 +166,9 @@ public class TestPlanFactory {
} }
private String createAScriptWithFilter( private String createAScriptWithFilter(
ScriptFilterOptionsModel scriptFilterOptionsModel, String scriptContent) { ScriptFilterOptionsModel scriptFilterOptionsModel,
if(scriptFilterOptionsModel == null){ String scriptContent) {
if (scriptFilterOptionsModel == null) {
return scriptContent; return scriptContent;
} }
RunScenarioModel runScenarioModel = (RunScenarioModel) MarshalHelper RunScenarioModel runScenarioModel = (RunScenarioModel) MarshalHelper

View File

@ -63,7 +63,7 @@ public class Test_TestPlan extends TestBase_MakeUpTestPlan {
assertTrue(this.getTestPlanRepository().updateEntity(testPlanInDomain)); assertTrue(this.getTestPlanRepository().updateEntity(testPlanInDomain));
TestPlan testPlanAfterRun = this.getTestPlanRepository() TestPlan testPlanAfterRun = this.getTestPlanRepository()
.getTestPlanInDomainBy(getTestPlanRunIdUuid()); .getRunningTestPlanBy(getTestPlanRunIdUuid());
testPlanAfterRun = this.getTestPlanFactory().convertToDomain( testPlanAfterRun = this.getTestPlanFactory().convertToDomain(
testPlanAfterRun); testPlanAfterRun);
Set<TestPlanScript> testPlanScripts = testPlanAfterRun Set<TestPlanScript> testPlanScripts = testPlanAfterRun