You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vg...@apache.org on 2011/12/21 19:33:23 UTC
svn commit: r1221835 -
/incubator/ambari/trunk/controller/src/test/java/org/apache/ambari/resource/statemachine/TestClusterImpl.java
Author: vgogate
Date: Wed Dec 21 18:33:23 2011
New Revision: 1221835
URL: http://svn.apache.org/viewvc?rev=1221835&view=rev
Log:
AMBARI-170. Update the cluster state after state machine transitions it to final ACTIVE/INACTIVE state
Modified:
incubator/ambari/trunk/controller/src/test/java/org/apache/ambari/resource/statemachine/TestClusterImpl.java
Modified: incubator/ambari/trunk/controller/src/test/java/org/apache/ambari/resource/statemachine/TestClusterImpl.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/test/java/org/apache/ambari/resource/statemachine/TestClusterImpl.java?rev=1221835&r1=1221834&r2=1221835&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/test/java/org/apache/ambari/resource/statemachine/TestClusterImpl.java (original)
+++ incubator/ambari/trunk/controller/src/test/java/org/apache/ambari/resource/statemachine/TestClusterImpl.java Wed Dec 21 18:33:23 2011
@@ -9,6 +9,7 @@ import java.io.IOException;
import java.util.ArrayList;
import org.apache.ambari.common.rest.entities.ClusterDefinition;
+import org.apache.ambari.common.rest.entities.ClusterState;
import org.apache.ambari.controller.Cluster;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -40,7 +41,9 @@ public class TestClusterImpl {
ClusterDefinition clusterDef = mock(ClusterDefinition.class);
when(clusterDef.getEnabledServices()).thenReturn(new ArrayList<String>());
Cluster cluster = mock(Cluster.class);
+ ClusterState clsState = mock(ClusterState.class);
when(cluster.getClusterDefinition(anyInt())).thenReturn(clusterDef);
+ when(cluster.getClusterState()).thenReturn(clsState);
clusterImpl = new ClusterImpl(cluster, 1);
}