diff options
author | Martin <marcin.j.chrzanowski@gmail.com> | 2019-12-30 13:32:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-30 13:32:48 +0100 |
commit | 00b7eaac7f87f73d9492bd7f917719fd364b5731 (patch) | |
tree | d737ead6bfd8f94eaa293b35d8e606555c4a3893 /src/test | |
parent | 75d494c5b14093efbf38d5def9d67e26fd99c253 (diff) | |
parent | da6455dc0c4a9da05ae606daa891787b623bdd20 (diff) |
Merge pull request #79 from m-chrzan/fix-executor-tests
Reenable executor tests
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/pl/edu/mimuw/cloudatlas/agent/ExecutorTest.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/ExecutorTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/ExecutorTest.java index 0ff7a07..2898d3c 100644 --- a/src/test/java/pl/edu/mimuw/cloudatlas/agent/ExecutorTest.java +++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/ExecutorTest.java @@ -4,6 +4,7 @@ import org.junit.Test; import static org.junit.Assert.*; import pl.edu.mimuw.cloudatlas.agent.messages.AgentMessage; +import pl.edu.mimuw.cloudatlas.agent.messages.ResponseMessage; import pl.edu.mimuw.cloudatlas.agent.modules.Module; import pl.edu.mimuw.cloudatlas.agent.modules.ModuleType; @@ -33,12 +34,11 @@ public class ExecutorTest { assertEquals(0, module.counter); } - /* @Test public void testExecutesHandlerOnce() throws Exception { MessageCounterModule module = new MessageCounterModule(ModuleType.UDP); Executor executor = new Executor(module); - executor.addMessage(new AgentMessage("", ModuleType.UDP, 0) {}); + executor.addMessage(new ResponseMessage("", ModuleType.UDP, 0, ResponseMessage.Type.STATE, 0) {}); Thread thread = new Thread(executor); thread.start(); Thread.sleep(100); @@ -50,15 +50,14 @@ public class ExecutorTest { public void testExecutesHandlerMultipleTimes() throws Exception { MessageCounterModule module = new MessageCounterModule(ModuleType.UDP); Executor executor = new Executor(module); - executor.addMessage(new AgentMessage("", ModuleType.UDP, 0) {}); - executor.addMessage(new AgentMessage("", ModuleType.UDP, 0) {}); + executor.addMessage(new ResponseMessage("", ModuleType.UDP, 0, ResponseMessage.Type.STATE, 0) {}); + executor.addMessage(new ResponseMessage("", ModuleType.UDP, 0, ResponseMessage.Type.STATE, 0) {}); Thread thread = new Thread(executor); thread.start(); Thread.sleep(100); - executor.addMessage(new AgentMessage("", ModuleType.UDP, 0) {}); + executor.addMessage(new ResponseMessage("", ModuleType.UDP, 0, ResponseMessage.Type.STATE, 0) {}); Thread.sleep(100); thread.interrupt(); assertEquals(3, module.counter); } - */ } |