From 3831d80df5dcd5d75d95308c8906dd9e3c054334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Sat, 11 Jan 2020 20:12:03 +0100 Subject: Fix tests --- src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java | 4 ++-- 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 initializeExecutors( + public static HashMap initializeExecutors( HashMap modules) { HashMap executors = new HashMap(); @@ -69,7 +69,7 @@ public class AgentConfig { return executors; } - private ArrayList initializeExecutorThreads(HashMap executors) { + public static ArrayList initializeExecutorThreads(HashMap executors) { ArrayList executorThreads = new ArrayList(); for (Map.Entry 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 initializeModule() { HashMap modules = new HashMap(); modules.put(ModuleType.TIMER_SCHEDULER, new TimerScheduler(ModuleType.TIMER_SCHEDULER)); -- cgit v1.2.3