diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-11 20:12:03 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-11 20:12:03 +0100 |
commit | 3831d80df5dcd5d75d95308c8906dd9e3c054334 (patch) | |
tree | 5e527587fb72e9cca0ac0fed6f5abfa7b79dd24c | |
parent | 22ec12d762db07b6ecc65462b1e7cb38c8ca1578 (diff) |
Fix tests
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java | 4 | ||||
-rw-r--r-- | src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java index 16bd99a..38d764a 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java @@ -56,7 +56,7 @@ public class AgentConfig { return modules; } - private HashMap<ModuleType, Executor> initializeExecutors( + public static HashMap<ModuleType, Executor> initializeExecutors( HashMap<ModuleType, Module> modules) { HashMap<ModuleType, Executor> executors = new HashMap<ModuleType, Executor>(); @@ -69,7 +69,7 @@ public class AgentConfig { return executors; } - private ArrayList<Thread> initializeExecutorThreads(HashMap<ModuleType, Executor> executors) { + public static ArrayList<Thread> initializeExecutorThreads(HashMap<ModuleType, Executor> executors) { ArrayList<Thread> executorThreads = new ArrayList<Thread>(); for (Map.Entry<ModuleType, Executor> executorEntry : executors.entrySet()) { diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java index ccb4c8d..0dab0e8 100644 --- a/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java +++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java @@ -23,13 +23,15 @@ public class SchedulerTest { public SchedulerTest() { this.modules = initializeModule(); - this.executors = Agent.initializeExecutors(modules); - this.executorThreads = Agent.initializeExecutorThreads(executors); + this.executors = AgentConfig.initializeExecutors(modules); + this.executorThreads = AgentConfig.initializeExecutorThreads(executors); this.eventBus = new EventBus(executors); this.eventBusThread = new Thread(eventBus); eventBusThread.start(); } + private + public HashMap<ModuleType, Module> initializeModule() { HashMap<ModuleType, Module> modules = new HashMap<ModuleType, Module>(); modules.put(ModuleType.TIMER_SCHEDULER, new TimerScheduler(ModuleType.TIMER_SCHEDULER)); |