Commit d72c9f0d by Spencer Gibb

make use of 'metadataMap.instanceId' consistent

parent bea48c51
......@@ -105,7 +105,7 @@ class DomainExtractingServer extends DiscoveryEnabledServer {
DiscoveryEnabledServer enabled = (DiscoveryEnabledServer) server;
InstanceInfo instance = enabled.getInstanceInfo();
if (instance.getMetadata().containsKey("instanceId")) {
return instance.getMetadata().get("instanceId");
return instance.getHostName()+":"+instance.getMetadata().get("instanceId");
}
}
return super.getId();
......
......@@ -98,7 +98,7 @@ public class DomainExtractingServerListTests {
actualServer instanceof DomainExtractingServer);
DomainExtractingServer des = DomainExtractingServer.class.cast(actualServer);
assertEquals("zone was wrong", zone, des.getZone());
assertEquals("instanceId was wrong", INSTANCE_ID, des.getId());
assertEquals("instanceId was wrong", HOST_NAME + ":" + INSTANCE_ID, des.getId());
return des;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment