You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/04/26 18:55:33 UTC
ambari git commit: AMBARI-16082. Test Refresh Phase 1 (#2) (ncole)
Repository: ambari
Updated Branches:
refs/heads/trunk 694a2d839 -> 56e3491e5
AMBARI-16082. Test Refresh Phase 1 (#2) (ncole)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/56e3491e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/56e3491e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/56e3491e
Branch: refs/heads/trunk
Commit: 56e3491e5f50d73c3a8a455fe8efe9036a6a456e
Parents: 694a2d8
Author: Nate Cole <nc...@hortonworks.com>
Authored: Tue Apr 26 12:55:14 2016 -0400
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Tue Apr 26 12:55:26 2016 -0400
----------------------------------------------------------------------
.../server/controller/AmbariManagementControllerTest.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/56e3491e/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index c9e14a1..3ec9cb3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -1779,6 +1779,7 @@ public class AmbariManagementControllerTest {
@Test
public void testCreateHostSimple() throws AmbariException {
+ String cluster1 = getUniqueName();
String host1 = getUniqueName();
String host2 = getUniqueName();
@@ -1804,7 +1805,8 @@ public class AmbariManagementControllerTest {
clusters.getHost(host1).persist();
clusters.getHost(host2).persist();
- requests.add(new HostRequest(host2, "foo", new HashMap<String, String>()));
+ HostRequest request = new HostRequest(host2, "foo", new HashMap<String, String>());
+ requests.add(request);
try {
HostResourceProviderTest.createHosts(controller, requests);
@@ -1813,8 +1815,10 @@ public class AmbariManagementControllerTest {
// Expected
}
- clusters.addCluster("foo", new StackId("HDP-0.1"));
- Cluster c = clusters.getCluster("foo");
+ request.setClusterName(cluster1);
+
+ clusters.addCluster(cluster1, new StackId("HDP-0.1"));
+ Cluster c = clusters.getCluster(cluster1);
StackId stackId = new StackId("HDP-0.1");
c.setDesiredStackVersion(stackId);
c.setCurrentStackVersion(stackId);