summaryrefslogtreecommitdiff
path: root/same/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/test/java')
-rw-r--r--same/src/test/java/com/orbekk/same/MasterServiceImplTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/same/src/test/java/com/orbekk/same/MasterServiceImplTest.java b/same/src/test/java/com/orbekk/same/MasterServiceImplTest.java
index 6b33fc0..0f27b98 100644
--- a/same/src/test/java/com/orbekk/same/MasterServiceImplTest.java
+++ b/same/src/test/java/com/orbekk/same/MasterServiceImplTest.java
@@ -45,4 +45,15 @@ public class MasterServiceImplTest {
assertTrue(master._performWork());
assertTrue(state.getAndClearUpdatedComponents().isEmpty());
}
+
+ @Test
+ public void clientJoin() {
+ master.setUrl("http://master");
+ ClientServiceImpl client = new ClientServiceImpl(
+ new State("ClientNetwork"), connections);
+ client.setUrl("http://client");
+ connections.clientMap.put("http://client", client);
+ master.joinNetworkRequest("TestNetwork", "http://client");
+ assertTrue(master._performWork());
+ }
}