m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-12-30 13:32:39 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-12-30 13:32:39 +0100
commitda6455dc0c4a9da05ae606daa891787b623bdd20 (patch)
treeae431add4b5822f63e8dd76488c08a76fb8c0bc3
parent7f03e1ddbd73831499d63eee1075b0b1226fa173 (diff)
Reenable executor tests
-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);
}
- */
}