You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/09/26 18:48:49 UTC
[34/44] git commit: AMBARI-7518. Add missed unit tests for
clusterimpl.(vbrodetskyi)
AMBARI-7518. Add missed unit tests for clusterimpl.(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/09bc5b90
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/09bc5b90
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/09bc5b90
Branch: refs/heads/branch-alerts-dev
Commit: 09bc5b904f26e63dcae01b6d40a4b6ea8e0663e0
Parents: 1a71bdc
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Fri Sep 26 16:38:20 2014 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Fri Sep 26 16:38:20 2014 +0300
----------------------------------------------------------------------
.../org/apache/ambari/server/state/cluster/ClusterTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/09bc5b90/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
index fa3a605..7a09514 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
@@ -57,6 +57,7 @@ import org.apache.ambari.server.orm.entities.ClusterServiceEntity;
import org.apache.ambari.server.orm.entities.HostEntity;
import org.apache.ambari.server.orm.entities.HostStateEntity;
import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntity;
+import org.apache.ambari.server.orm.entities.ClusterStateEntity;
import org.apache.ambari.server.state.AgentVersion;
import org.apache.ambari.server.state.Alert;
import org.apache.ambari.server.state.AlertState;
@@ -485,9 +486,12 @@ public class ClusterTest {
return clusterEntity;
}
- @Ignore
+ @Test
public void testClusterRecovery() throws AmbariException {
ClusterEntity entity = createDummyData();
+ ClusterStateEntity clusterStateEntity = new ClusterStateEntity();
+ clusterStateEntity.setCurrentStackVersion("{\"stackName\":\"HDP\",\"stackVersion\":\"0.1\"}");
+ entity.setClusterStateEntity(clusterStateEntity);
ClusterImpl cluster = new ClusterImpl(entity, injector);
Service service = cluster.getService("HDFS");
/* make sure the services are recovered */