m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-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);
}
- */
}