summaryrefslogtreecommitdiff
path: root/same
diff options
context:
space:
mode:
Diffstat (limited to 'same')
-rw-r--r--same/src/main/java/com/orbekk/same/ClientServiceImpl.java5
-rw-r--r--same/src/test/java/com/orbekk/same/ClientServiceImplTest.java2
2 files changed, 3 insertions, 4 deletions
diff --git a/same/src/main/java/com/orbekk/same/ClientServiceImpl.java b/same/src/main/java/com/orbekk/same/ClientServiceImpl.java
index 658bf37..3ba8b04 100644
--- a/same/src/main/java/com/orbekk/same/ClientServiceImpl.java
+++ b/same/src/main/java/com/orbekk/same/ClientServiceImpl.java
@@ -149,14 +149,13 @@ public class ClientServiceImpl implements UrlReceiver,
@Override
public void discover(String url) {
- String clientUrl = url + "ClientService.json";
if (!url.equals(myUrl)) {
try {
- connections.getClient(clientUrl)
+ connections.getClient(url)
.notifyNetwork(state.getDataOf(".networkName"),
state.getDataOf(".masterUrl"));
} catch (Exception e) {
- logger.warn("Failed to contact new client {}: {}", clientUrl,
+ logger.warn("Failed to contact new client {}: {}", url,
throwableToString(e));
}
}
diff --git a/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java b/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
index 5f04485..2cae247 100644
--- a/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
+++ b/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
@@ -31,7 +31,7 @@ public class ClientServiceImplTest {
ClientService mockClient = mock(ClientService.class);
connections.clientMap.put("mockClient/ClientService.json",
mockClient);
- client.discover("mockClient/");
+ client.discover("mockClient/ClientService.json");
verify(mockClient).notifyNetwork("ClientNetwork", "master");
}
}