m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMartin <marcin.j.chrzanowski@gmail.com>2019-12-30 13:32:48 +0100
committerGitHub <noreply@github.com>2019-12-30 13:32:48 +0100
commit00b7eaac7f87f73d9492bd7f917719fd364b5731 (patch)
treed737ead6bfd8f94eaa293b35d8e606555c4a3893 /src/test
parent75d494c5b14093efbf38d5def9d67e26fd99c253 (diff)
parentda6455dc0c4a9da05ae606daa891787b623bdd20 (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.java11
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);
}
- */
}