From bbeae6ffb6e8ca5095108c110455e7460646a990 Mon Sep 17 00:00:00 2001 From: coderfengyun Date: Fri, 21 Mar 2014 15:54:01 +0800 Subject: [PATCH] refactor refactor --- .../java/org/bench4q/master/domain/entity/TestPlanScript.java | 2 +- .../org/bench4q/master/domain/factory/TestPlanFactory.java | 2 +- .../bench4q/master/domain/testplan/RunningScriptSampler.java | 2 +- .../org/bench4q/master/domain/testplan/TestMonitorSampler.java | 2 +- .../infrastructure/{communication => }/AgentMessenger.java | 2 +- .../infrastructure/{communication => }/MonitorMessenger.java | 2 +- .../master/testplan/highavailable/HighAvailablePool.java | 2 +- .../testplan/highavailable/faultolerence/BriefAgentFault.java | 2 +- .../org/bench4q/master/transaction/agent/AgentTransaction.java | 2 +- .../org/bench4q/master/transaction/script/ScriptLoadBase.java | 2 +- .../src/test/java/MonitorModelTest/MonitorModelTest.java | 2 +- .../java/org/bench4q/master/test/TestBase_MakeUpTestPlan.java | 2 +- .../master/test/communication/Test_MonitorMessenger.java | 2 +- .../org/bench4q/master/test/service/Test_MonitorMessenger.java | 3 +-- 14 files changed, 14 insertions(+), 15 deletions(-) rename Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/{communication => }/AgentMessenger.java (99%) rename Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/{communication => }/MonitorMessenger.java (98%) diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java index 7c68e478..9304ce54 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java @@ -30,7 +30,7 @@ import org.bench4q.master.domain.service.AgentService; import org.bench4q.master.domain.service.TestPlanService; import org.bench4q.master.domain.testplan.RunningScriptSampler; import org.bench4q.master.exception.ExceptionLog; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.master.testplan.highavailable.AgentRunBlotter; import org.bench4q.master.testplan.highavailable.faultolerence.StopAgentFault; import org.bench4q.master.testplan.schedulscript.ExecutionOverTask; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java index 9d51cd2e..c2fd6956 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java @@ -27,7 +27,7 @@ import org.bench4q.master.domain.testplan.TestMoniorResultSave; import org.bench4q.master.domain.testplan.TestScriptResultSave; import org.bench4q.master.exception.ExceptionLog; import org.bench4q.master.exception.ExceptionUtils.IllegalParameterException; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.share.enums.master.TestPlanStatus; import org.bench4q.share.helper.MarshalHelper; import org.bench4q.share.models.master.MonitorModel; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/RunningScriptSampler.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/RunningScriptSampler.java index 70f899a9..0df9f872 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/RunningScriptSampler.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/RunningScriptSampler.java @@ -7,7 +7,7 @@ import java.util.List; import org.bench4q.master.domain.RunningAgentInterface; import org.bench4q.master.helper.ApplicationContextHelper; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.master.testplan.datastatistics.BehaviorsBriefStatistics; import org.bench4q.master.testplan.datastatistics.DataStatistics; import org.bench4q.master.testplan.datastatistics.PagesBriefStatistics; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/TestMonitorSampler.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/TestMonitorSampler.java index cca1d6ce..e1302c6c 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/TestMonitorSampler.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/testplan/TestMonitorSampler.java @@ -1,7 +1,7 @@ package org.bench4q.master.domain.testplan; -import org.bench4q.master.infrastructure.communication.MonitorMessenger; +import org.bench4q.master.infrastructure.MonitorMessenger; import org.bench4q.share.models.monitor.MonitorMain; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/AgentMessenger.java b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/AgentMessenger.java similarity index 99% rename from Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/AgentMessenger.java rename to Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/AgentMessenger.java index 7c9e0dfb..64689e18 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/AgentMessenger.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/AgentMessenger.java @@ -1,4 +1,4 @@ -package org.bench4q.master.infrastructure.communication; +package org.bench4q.master.infrastructure; import java.io.File; import java.io.IOException; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/MonitorMessenger.java b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/MonitorMessenger.java similarity index 98% rename from Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/MonitorMessenger.java rename to Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/MonitorMessenger.java index 63f67f2f..86c8e09a 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/MonitorMessenger.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/MonitorMessenger.java @@ -1,4 +1,4 @@ -package org.bench4q.master.infrastructure.communication; +package org.bench4q.master.infrastructure; import java.io.IOException; import java.util.Date; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/HighAvailablePool.java b/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/HighAvailablePool.java index 6e7fccc7..5b3fe8f2 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/HighAvailablePool.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/HighAvailablePool.java @@ -12,7 +12,7 @@ import org.bench4q.master.domain.RunningAgentInterface; import org.bench4q.master.domain.RunningScriptInterface; import org.bench4q.master.domain.entity.Agent; import org.bench4q.master.domain.service.AgentService; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.share.models.agent.ServerStatusModel; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/faultolerence/BriefAgentFault.java b/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/faultolerence/BriefAgentFault.java index e116dbc3..61d65cf9 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/faultolerence/BriefAgentFault.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/testplan/highavailable/faultolerence/BriefAgentFault.java @@ -2,7 +2,7 @@ package org.bench4q.master.testplan.highavailable.faultolerence; import org.bench4q.master.domain.entity.Agent; import org.bench4q.master.helper.ApplicationContextHelper; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.master.testplan.highavailable.HighAvailablePool; public class BriefAgentFault implements FaultTolerance { diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/agent/AgentTransaction.java b/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/agent/AgentTransaction.java index a9f4a4ff..4f461644 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/agent/AgentTransaction.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/agent/AgentTransaction.java @@ -7,7 +7,7 @@ import org.bench4q.master.domain.entity.Agent; import org.bench4q.master.domain.service.AgentService; import org.bench4q.master.exception.ExceptionLog; import org.bench4q.master.helper.ApplicationContextHelper; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.master.transaction.Transaction; import org.bench4q.share.models.agent.RunScenarioModel; import org.bench4q.share.models.agent.RunScenarioResultModel; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/script/ScriptLoadBase.java b/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/script/ScriptLoadBase.java index 4b3cdbec..3f7b6de2 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/script/ScriptLoadBase.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/transaction/script/ScriptLoadBase.java @@ -14,7 +14,7 @@ import org.bench4q.master.domain.entity.Agent; import org.bench4q.master.domain.service.AgentService; import org.bench4q.master.exception.ExceptionLog; import org.bench4q.master.helper.ApplicationContextHelper; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.master.testplan.highavailable.AgentRunBlotter; import org.bench4q.master.testplan.highavailable.HighAvailablePool; import org.bench4q.master.transaction.Transaction; diff --git a/Bench4Q-Master/src/test/java/MonitorModelTest/MonitorModelTest.java b/Bench4Q-Master/src/test/java/MonitorModelTest/MonitorModelTest.java index 0853e712..ed74fe0d 100644 --- a/Bench4Q-Master/src/test/java/MonitorModelTest/MonitorModelTest.java +++ b/Bench4Q-Master/src/test/java/MonitorModelTest/MonitorModelTest.java @@ -1,7 +1,7 @@ package MonitorModelTest; import static org.junit.Assert.*; -import org.bench4q.master.infrastructure.communication.MonitorMessenger; +import org.bench4q.master.infrastructure.MonitorMessenger; import org.bench4q.share.models.master.MonitorModel; import org.junit.Assert; import org.junit.Before; diff --git a/Bench4Q-Master/src/test/java/org/bench4q/master/test/TestBase_MakeUpTestPlan.java b/Bench4Q-Master/src/test/java/org/bench4q/master/test/TestBase_MakeUpTestPlan.java index de2e4383..08fa5d04 100644 --- a/Bench4Q-Master/src/test/java/org/bench4q/master/test/TestBase_MakeUpTestPlan.java +++ b/Bench4Q-Master/src/test/java/org/bench4q/master/test/TestBase_MakeUpTestPlan.java @@ -18,7 +18,7 @@ import org.bench4q.master.domain.service.TestPlanService; import org.bench4q.master.domain.service.UserService; import org.bench4q.master.domain.testplan.TestMoniorResultSave; import org.bench4q.master.domain.testplan.TestScriptResultSave; -import org.bench4q.master.infrastructure.communication.AgentMessenger; +import org.bench4q.master.infrastructure.AgentMessenger; import org.bench4q.master.test.controller.TestBase; import org.bench4q.master.testplan.highavailable.HighAvailablePool; import org.bench4q.share.models.master.MonitorModel; diff --git a/Bench4Q-Master/src/test/java/org/bench4q/master/test/communication/Test_MonitorMessenger.java b/Bench4Q-Master/src/test/java/org/bench4q/master/test/communication/Test_MonitorMessenger.java index 2d6013ed..05ce741a 100644 --- a/Bench4Q-Master/src/test/java/org/bench4q/master/test/communication/Test_MonitorMessenger.java +++ b/Bench4Q-Master/src/test/java/org/bench4q/master/test/communication/Test_MonitorMessenger.java @@ -1,7 +1,7 @@ package org.bench4q.master.test.communication; import org.bench4q.master.domain.entity.Monitor; -import org.bench4q.master.infrastructure.communication.MonitorMessenger; +import org.bench4q.master.infrastructure.MonitorMessenger; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/Bench4Q-Master/src/test/java/org/bench4q/master/test/service/Test_MonitorMessenger.java b/Bench4Q-Master/src/test/java/org/bench4q/master/test/service/Test_MonitorMessenger.java index defedea1..b8e93207 100644 --- a/Bench4Q-Master/src/test/java/org/bench4q/master/test/service/Test_MonitorMessenger.java +++ b/Bench4Q-Master/src/test/java/org/bench4q/master/test/service/Test_MonitorMessenger.java @@ -2,8 +2,7 @@ package org.bench4q.master.test.service; import static org.junit.Assert.*; - -import org.bench4q.master.infrastructure.communication.MonitorMessenger; +import org.bench4q.master.infrastructure.MonitorMessenger; import org.bench4q.share.models.monitor.MemoryModel; import org.bench4q.share.models.monitor.MonitorMain; import org.bench4q.share.models.monitor.NetworkInterfaceModel;