You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/03/18 23:12:47 UTC
[2/7] incubator-brooklyn git commit: fix failing test for controller
where test entity did not set subnet_hostname
fix failing test for controller where test entity did not set subnet_hostname
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/a94b4d02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/a94b4d02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/a94b4d02
Branch: refs/heads/master
Commit: a94b4d02a20e4bcbd8b040451c4d9dcfb3a29e1b
Parents: 40b21d6
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Tue Mar 17 19:17:45 2015 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Wed Mar 18 22:08:20 2015 +0000
----------------------------------------------------------------------
.../test/java/brooklyn/entity/proxy/AbstractControllerTest.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a94b4d02/software/webapp/src/test/java/brooklyn/entity/proxy/AbstractControllerTest.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/test/java/brooklyn/entity/proxy/AbstractControllerTest.java b/software/webapp/src/test/java/brooklyn/entity/proxy/AbstractControllerTest.java
index dd8da68..54f5779 100644
--- a/software/webapp/src/test/java/brooklyn/entity/proxy/AbstractControllerTest.java
+++ b/software/webapp/src/test/java/brooklyn/entity/proxy/AbstractControllerTest.java
@@ -117,16 +117,19 @@ public class AbstractControllerTest extends BrooklynAppUnitTestSupport {
Thread.sleep(100);
child.setAttribute(ClusteredEntity.HOSTNAME, "mymachine");
+ child.setAttribute(Attributes.SUBNET_HOSTNAME, "mymachine");
child.setAttribute(ClusteredEntity.HTTP_PORT, 1234);
assertEventuallyExplicitAddressesMatch(ImmutableList.of("mymachine:1234"));
child.setAttribute(ClusteredEntity.HOSTNAME, "mymachine2");
+ child.setAttribute(Attributes.SUBNET_HOSTNAME, "mymachine2");
assertEventuallyExplicitAddressesMatch(ImmutableList.of("mymachine2:1234"));
child.setAttribute(ClusteredEntity.HTTP_PORT, 1235);
assertEventuallyExplicitAddressesMatch(ImmutableList.of("mymachine2:1235"));
child.setAttribute(ClusteredEntity.HOSTNAME, null);
+ child.setAttribute(Attributes.SUBNET_HOSTNAME, null);
assertEventuallyExplicitAddressesMatch(ImmutableList.<String>of());
}
@@ -351,6 +354,7 @@ public class AbstractControllerTest extends BrooklynAppUnitTestSupport {
}
addLocations(Arrays.asList(machine));
setAttribute(HOSTNAME, machine.getAddress().getHostName());
+ setAttribute(Attributes.SUBNET_HOSTNAME, machine.getAddress().getHostName());
}
public void stop() {
if (provisioner!=null) provisioner.release((MachineLocation) firstLocation());