ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [1/3] ambari git commit: AMBARI-14996. Component should support a desired version (dlysnichenko)
Date Tue, 23 Feb 2016 15:20:08 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade 50547c5ed -> cbef0c146


http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
index 89f0ba6..207b4c7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
@@ -156,7 +156,7 @@ public class ComponentVersionCheckActionTest {
 
     // Create the starting repo version
     m_helper.getOrCreateRepositoryVersion(sourceStack, sourceRepo);
-    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.UPGRADING);
+    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(sourceStack, sourceRepo, RepositoryVersionState.CURRENT);
 
     // Create the new repo version
@@ -168,8 +168,6 @@ public class ComponentVersionCheckActionTest {
     // Start upgrading the newer repo
     c.createClusterVersion(targetStack, targetRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADING);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADED);
     c.setCurrentStackVersion(targetStack);
 
     c.mapHostVersions(Collections.singleton(hostName), c.getCurrentClusterVersion(),
@@ -180,7 +178,7 @@ public class ComponentVersionCheckActionTest {
     HostVersionEntity entity = new HostVersionEntity();
     entity.setHostEntity(hostDAO.findByName(hostName));
     entity.setRepositoryVersion(repoVersionDAO.findByStackAndVersion(targetStack, targetRepo));
-    entity.setState(RepositoryVersionState.UPGRADED);
+    entity.setState(RepositoryVersionState.INSTALLED);
     hostVersionDAO.create(entity);
   }
 
@@ -216,7 +214,7 @@ public class ComponentVersionCheckActionTest {
 
     // Create the starting repo version
     m_helper.getOrCreateRepositoryVersion(sourceStack, sourceRepo);
-    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.UPGRADING);
+    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(sourceStack, sourceRepo, RepositoryVersionState.CURRENT);
 
     // Create the new repo version
@@ -228,8 +226,6 @@ public class ComponentVersionCheckActionTest {
     // Start upgrading the newer repo
     c.createClusterVersion(targetStack, targetRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADING);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADED);
 
     c.mapHostVersions(Collections.singleton(hostName), c.getCurrentClusterVersion(),
         RepositoryVersionState.CURRENT);
@@ -239,7 +235,7 @@ public class ComponentVersionCheckActionTest {
     HostVersionEntity entity = new HostVersionEntity();
     entity.setHostEntity(hostDAO.findByName(hostName));
     entity.setRepositoryVersion(repoVersionDAO.findByStackAndVersion(targetStack, targetRepo));
-    entity.setState(RepositoryVersionState.UPGRADED);
+    entity.setState(RepositoryVersionState.INSTALLED);
     hostVersionDAO.create(entity);
   }
 
@@ -316,17 +312,17 @@ public class ComponentVersionCheckActionTest {
     ClusterVersionEntity upgradingClusterVersion = clusterVersionDAO.findByClusterAndStackAndVersion(
         "c1", HDP_22_STACK, targetRepo);
 
-    upgradingClusterVersion.setState(RepositoryVersionState.UPGRADING);
+    upgradingClusterVersion.setState(RepositoryVersionState.INSTALLING);
     upgradingClusterVersion = clusterVersionDAO.merge(upgradingClusterVersion);
 
     // verify the conditions for the test are met properly
     upgradingClusterVersion = clusterVersionDAO.findByClusterAndStackAndVersion("c1", HDP_22_STACK,
targetRepo);
     List<HostVersionEntity> hostVersions = hostVersionDAO.findByClusterStackAndVersion("c1",
HDP_22_STACK, targetRepo);
 
-    assertEquals(RepositoryVersionState.UPGRADING, upgradingClusterVersion.getState());
+    assertEquals(RepositoryVersionState.INSTALLING, upgradingClusterVersion.getState());
     assertTrue(hostVersions.size() > 0);
     for (HostVersionEntity hostVersion : hostVersions) {
-      assertEquals(RepositoryVersionState.UPGRADED, hostVersion.getState());
+      assertEquals(RepositoryVersionState.INSTALLED, hostVersion.getState());
     }
 
     // now finalize and ensure we can transition from UPGRADING to UPGRADED

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
index 14137cc..ce87668 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
@@ -703,7 +703,7 @@ public class ConfigureActionTest {
 
     // Creating starting repo
     m_helper.getOrCreateRepositoryVersion(HDP_220_STACK, HDP_2_2_0_0);
-    c.createClusterVersion(HDP_220_STACK, HDP_2_2_0_0, "admin", RepositoryVersionState.UPGRADING);
+    c.createClusterVersion(HDP_220_STACK, HDP_2_2_0_0, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(HDP_220_STACK, HDP_2_2_0_0, RepositoryVersionState.CURRENT);
 
     String urlInfo = "[{'repositories':["
@@ -714,8 +714,6 @@ public class ConfigureActionTest {
 
     c.createClusterVersion(HDP_220_STACK, HDP_2_2_0_1, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(HDP_220_STACK, HDP_2_2_0_1, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(HDP_220_STACK, HDP_2_2_0_1, RepositoryVersionState.UPGRADING);
-    c.transitionClusterVersion(HDP_220_STACK, HDP_2_2_0_1, RepositoryVersionState.UPGRADED);
     c.setCurrentStackVersion(HDP_220_STACK);
 
     c.mapHostVersions(Collections.singleton(hostName), c.getCurrentClusterVersion(),
@@ -726,7 +724,7 @@ public class ConfigureActionTest {
     HostVersionEntity entity = new HostVersionEntity();
     entity.setHostEntity(hostDAO.findByName(hostName));
     entity.setRepositoryVersion(repoVersionDAO.findByStackAndVersion(HDP_220_STACK, HDP_2_2_0_1));
-    entity.setState(RepositoryVersionState.UPGRADED);
+    entity.setState(RepositoryVersionState.INSTALLED);
     hostVersionDAO.create(entity);
 
     // verify that our configs are there

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
index f43642c..9608b79 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
@@ -83,6 +83,7 @@ import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import com.google.gson.Gson;
@@ -196,14 +197,13 @@ public class UpgradeActionTest {
 
     // Create the starting repo version
     m_helper.getOrCreateRepositoryVersion(sourceStack, sourceRepo);
-    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.UPGRADING);
+    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(sourceStack, sourceRepo, RepositoryVersionState.CURRENT);
 
     // Start upgrading the newer repo
     m_helper.getOrCreateRepositoryVersion(targetStack, targetRepo);
     c.createClusterVersion(targetStack, targetRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADING);
 
     c.mapHostVersions(Collections.singleton(hostName), c.getCurrentClusterVersion(),
         RepositoryVersionState.CURRENT);
@@ -211,7 +211,7 @@ public class UpgradeActionTest {
     HostVersionEntity entity = new HostVersionEntity();
     entity.setHostEntity(hostDAO.findByName(hostName));
     entity.setRepositoryVersion(repoVersionDAO.findByStackAndVersion(targetStack, targetRepo));
-    entity.setState(RepositoryVersionState.UPGRADING);
+    entity.setState(RepositoryVersionState.INSTALLING);
     hostVersionDAO.create(entity);
   }
 
@@ -235,7 +235,7 @@ public class UpgradeActionTest {
 
     // Create the starting repo version
     m_helper.getOrCreateRepositoryVersion(sourceStack, sourceRepo);
-    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.UPGRADING);
+    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(sourceStack, sourceRepo, RepositoryVersionState.CURRENT);
 
     // Start upgrading the mid repo
@@ -243,8 +243,6 @@ public class UpgradeActionTest {
     c.setDesiredStackVersion(midStack);
     c.createClusterVersion(midStack, midRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(midStack, midRepo, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(midStack, midRepo, RepositoryVersionState.UPGRADING);
-    c.transitionClusterVersion(midStack, midRepo, RepositoryVersionState.UPGRADED);
     c.transitionClusterVersion(midStack, midRepo, RepositoryVersionState.CURRENT);
 
     // Set original version as INSTALLED
@@ -257,8 +255,6 @@ public class UpgradeActionTest {
     c.setDesiredStackVersion(targetStack);
     c.createClusterVersion(targetStack, targetRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADING);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADED);
 
     // Create a host version for the starting repo in INSTALLED
     HostVersionEntity entitySource = new HostVersionEntity();
@@ -275,7 +271,7 @@ public class UpgradeActionTest {
     HostVersionEntity entityTarget = new HostVersionEntity();
     entityTarget.setHostEntity(hostDAO.findByName(hostName));
     entityTarget.setRepositoryVersion(repoVersionDAO.findByStackAndVersion(targetStack, targetRepo));
-    entityTarget.setState(RepositoryVersionState.UPGRADED);
+    entityTarget.setState(RepositoryVersionState.INSTALLED);
     hostVersionDAO.create(entityTarget);
   }
 
@@ -310,7 +306,7 @@ public class UpgradeActionTest {
 
     // Create the starting repo version
     m_helper.getOrCreateRepositoryVersion(sourceStack, sourceRepo);
-    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.UPGRADING);
+    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(sourceStack, sourceRepo, RepositoryVersionState.CURRENT);
 
     // Create the new repo version
@@ -323,8 +319,6 @@ public class UpgradeActionTest {
     // Start upgrading the newer repo
     c.createClusterVersion(targetStack, targetRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADING);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADED);
     c.setCurrentStackVersion(targetStack);
 
     c.mapHostVersions(Collections.singleton(hostName), c.getCurrentClusterVersion(),
@@ -337,7 +331,7 @@ public class UpgradeActionTest {
         targetStack, targetRepo);
 
     HostVersionEntity entity = new HostVersionEntity(hostDAO.findByName(hostName),
-        repositoryVersionEntity, RepositoryVersionState.UPGRADED);
+        repositoryVersionEntity, RepositoryVersionState.INSTALLED);
 
     hostVersionDAO.create(entity);
 
@@ -346,7 +340,7 @@ public class UpgradeActionTest {
         targetStack, targetRepo);
 
     assertEquals(1, hostVersions.size());
-    assertEquals(RepositoryVersionState.UPGRADED, hostVersions.get(0).getState());
+    assertEquals(RepositoryVersionState.INSTALLED, hostVersions.get(0).getState());
   }
 
   private void makeCrossStackUpgradeCluster(StackId sourceStack, String sourceRepo, StackId
targetStack, String targetRepo) throws Exception {
@@ -380,7 +374,7 @@ public class UpgradeActionTest {
 
     // Create the starting repo version
     m_helper.getOrCreateRepositoryVersion(sourceStack, sourceRepo);
-    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.UPGRADING);
+    c.createClusterVersion(sourceStack, sourceRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(sourceStack, sourceRepo, RepositoryVersionState.CURRENT);
 
     // Create the new repo version
@@ -392,8 +386,6 @@ public class UpgradeActionTest {
     // Start upgrading the newer repo
     c.createClusterVersion(targetStack, targetRepo, "admin", RepositoryVersionState.INSTALLING);
     c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.INSTALLED);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADING);
-    c.transitionClusterVersion(targetStack, targetRepo, RepositoryVersionState.UPGRADED);
 
     c.mapHostVersions(Collections.singleton(hostName), c.getCurrentClusterVersion(),
         RepositoryVersionState.CURRENT);
@@ -403,7 +395,7 @@ public class UpgradeActionTest {
     HostVersionEntity entity = new HostVersionEntity();
     entity.setHostEntity(hostDAO.findByName(hostName));
     entity.setRepositoryVersion(repoVersionDAO.findByStackAndVersion(targetStack, targetRepo));
-    entity.setState(RepositoryVersionState.UPGRADED);
+    entity.setState(RepositoryVersionState.INSTALLED);
     hostVersionDAO.create(entity);
   }
 
@@ -802,7 +794,7 @@ public class UpgradeActionTest {
     List<HostVersionEntity> hosts = dao.findByClusterStackAndVersion(clusterName, targetStack,
targetRepo);
     assertFalse(hosts.isEmpty());
     for (HostVersionEntity hve : hosts) {
-      assertFalse(hve.getState() == RepositoryVersionState.INSTALLED);
+      assertTrue(hve.getState() == RepositoryVersionState.INSTALLED);
     }
 
     FinalizeUpgradeAction action = m_injector.getInstance(FinalizeUpgradeAction.class);
@@ -874,17 +866,17 @@ public class UpgradeActionTest {
     ClusterVersionEntity upgradingClusterVersion = clusterVersionDAO.findByClusterAndStackAndVersion(
         clusterName, HDP_22_STACK, targetRepo);
 
-    upgradingClusterVersion.setState(RepositoryVersionState.UPGRADING);
+    upgradingClusterVersion.setState(RepositoryVersionState.INSTALLING);
     upgradingClusterVersion = clusterVersionDAO.merge(upgradingClusterVersion);
 
     // verify the conditions for the test are met properly
     upgradingClusterVersion = clusterVersionDAO.findByClusterAndStackAndVersion(clusterName,
HDP_22_STACK, targetRepo);
     List<HostVersionEntity> hostVersions = hostVersionDAO.findByClusterStackAndVersion(clusterName,
HDP_22_STACK, targetRepo);
 
-    assertEquals(RepositoryVersionState.UPGRADING, upgradingClusterVersion.getState());
+    assertEquals(RepositoryVersionState.INSTALLING, upgradingClusterVersion.getState());
     assertTrue(hostVersions.size() > 0);
     for (HostVersionEntity hostVersion : hostVersions) {
-      assertEquals(RepositoryVersionState.UPGRADED, hostVersion.getState());
+      assertEquals(RepositoryVersionState.INSTALLED, hostVersion.getState());
     }
 
     // now finalize and ensure we can transition from UPGRADING to UPGRADED

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
index 55e7a61..0adac80 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
@@ -96,7 +96,7 @@ public class ServiceComponentTest {
     Assert.assertNotNull(cluster);
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     Service s = serviceFactory.createNew(cluster, serviceName);
     cluster.addService(s);

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
index 62d5981..1a5d4e7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
@@ -1017,7 +1017,7 @@ public class UpgradeHelperTest {
 
     c.createClusterVersion(stackId,
         c.getDesiredStackVersion().getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     for (int i = 0; i < 4; i++) {
       String hostName = "h" + (i+1);
@@ -1234,7 +1234,7 @@ public class UpgradeHelperTest {
 
     c.createClusterVersion(stackId,
         c.getDesiredStackVersion().getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     for (int i = 0; i < 2; i++) {
       String hostName = "h" + (i+1);
@@ -1314,7 +1314,7 @@ public class UpgradeHelperTest {
 
     c.createClusterVersion(stackId,
         c.getDesiredStackVersion().getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     for (int i = 0; i < 2; i++) {
       String hostName = "h" + (i+1);
@@ -1380,7 +1380,7 @@ public class UpgradeHelperTest {
 
     c.createClusterVersion(stackId,
         c.getDesiredStackVersion().getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     for (int i = 0; i < 2; i++) {
       String hostName = "h" + (i+1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
index 847de7d..0a3286c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
@@ -123,7 +123,7 @@ public class ClusterDeadlockTest {
     cluster = clusters.getCluster("c1");
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId,
-        stackId.getStackVersion(), "admin", RepositoryVersionState.UPGRADING);
+        stackId.getStackVersion(), "admin", RepositoryVersionState.INSTALLING);
 
     Config config1 = configFactory.createNew(cluster, "test-type1", new HashMap<String,
String>(), new HashMap<String,
         Map<String, String>>());

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/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 2ffcd5d..87da21c 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
@@ -32,6 +32,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.ConcurrentModificationException;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -124,6 +125,9 @@ import junit.framework.Assert;
 
 public class ClusterTest {
 
+  private static final EnumSet<RepositoryVersionState> TERMINAL_VERSION_STATES =
+      EnumSet.of(RepositoryVersionState.CURRENT, RepositoryVersionState.INSTALLED);
+
   private Clusters clusters;
   private Cluster c1;
   private Injector injector;
@@ -256,7 +260,7 @@ public class ClusterTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     c1.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     c1.transitionClusterVersion(stackId, stackId.getStackVersion(),
         RepositoryVersionState.CURRENT);
 
@@ -1345,13 +1349,6 @@ public class ClusterTest {
 
     assertStateException(stackId, version, RepositoryVersionState.CURRENT,
         RepositoryVersionState.INSTALLING);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADING,
-        RepositoryVersionState.INSTALLING);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADED,
-        RepositoryVersionState.INSTALLING);
-    assertStateException(stackId, version,
-        RepositoryVersionState.UPGRADE_FAILED,
-        RepositoryVersionState.INSTALLING);
 
     c1.transitionClusterVersion(stackId, version,
         RepositoryVersionState.INSTALL_FAILED);
@@ -1362,13 +1359,6 @@ public class ClusterTest {
         RepositoryVersionState.INSTALL_FAILED);
     assertStateException(stackId, version, RepositoryVersionState.INSTALLED,
         RepositoryVersionState.INSTALL_FAILED);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADING,
-        RepositoryVersionState.INSTALL_FAILED);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADED,
-        RepositoryVersionState.INSTALL_FAILED);
-    assertStateException(stackId, version,
-        RepositoryVersionState.UPGRADE_FAILED,
-        RepositoryVersionState.INSTALL_FAILED);
     assertStateException(stackId, version, RepositoryVersionState.OUT_OF_SYNC,
         RepositoryVersionState.INSTALL_FAILED);
 
@@ -1380,10 +1370,6 @@ public class ClusterTest {
         RepositoryVersionState.INSTALLED);
     checkStackVersionState(stackId, version, RepositoryVersionState.INSTALLED);
 
-    assertStateException(stackId, version, RepositoryVersionState.CURRENT,
-        RepositoryVersionState.INSTALLED);
-    assertStateException(stackId, version,
-        RepositoryVersionState.UPGRADE_FAILED, RepositoryVersionState.INSTALLED);
     assertStateException(stackId, version,
         RepositoryVersionState.INSTALL_FAILED, RepositoryVersionState.INSTALLED);
 
@@ -1398,13 +1384,6 @@ public class ClusterTest {
     assertStateException(stackId, version,
         RepositoryVersionState.INSTALL_FAILED,
         RepositoryVersionState.OUT_OF_SYNC);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADING,
-        RepositoryVersionState.OUT_OF_SYNC);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADED,
-        RepositoryVersionState.OUT_OF_SYNC);
-    assertStateException(stackId, version,
-        RepositoryVersionState.UPGRADE_FAILED,
-        RepositoryVersionState.OUT_OF_SYNC);
 
     c1.transitionClusterVersion(stackId, version,
         RepositoryVersionState.INSTALLING);
@@ -1414,55 +1393,6 @@ public class ClusterTest {
         RepositoryVersionState.INSTALLED);
     checkStackVersionState(stackId, version, RepositoryVersionState.INSTALLED);
 
-    c1.transitionClusterVersion(stackId, version,
-        RepositoryVersionState.UPGRADING);
-    checkStackVersionState(stackId, version, RepositoryVersionState.UPGRADING);
-
-    assertStateException(stackId, version, RepositoryVersionState.CURRENT,
-        RepositoryVersionState.UPGRADING);
-    assertStateException(stackId, version, RepositoryVersionState.INSTALLED,
-        RepositoryVersionState.UPGRADING);
-    assertStateException(stackId, version,
-        RepositoryVersionState.INSTALL_FAILED, RepositoryVersionState.UPGRADING);
-    assertStateException(stackId, version, RepositoryVersionState.OUT_OF_SYNC,
-        RepositoryVersionState.UPGRADING);
-
-    c1.transitionClusterVersion(stackId, version,
-        RepositoryVersionState.UPGRADE_FAILED);
-    checkStackVersionState(stackId, version,
-        RepositoryVersionState.UPGRADE_FAILED);
-
-    assertStateException(stackId, version, RepositoryVersionState.CURRENT,
-        RepositoryVersionState.UPGRADE_FAILED);
-    assertStateException(stackId, version, RepositoryVersionState.INSTALLED,
-        RepositoryVersionState.UPGRADE_FAILED);
-    assertStateException(stackId, version,
-        RepositoryVersionState.INSTALL_FAILED,
-        RepositoryVersionState.UPGRADE_FAILED);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADED,
-        RepositoryVersionState.UPGRADE_FAILED);
-    assertStateException(stackId, version, RepositoryVersionState.OUT_OF_SYNC,
-        RepositoryVersionState.UPGRADE_FAILED);
-
-    c1.transitionClusterVersion(stackId, version,
-        RepositoryVersionState.UPGRADING);
-    checkStackVersionState(stackId, version, RepositoryVersionState.UPGRADING);
-
-    c1.transitionClusterVersion(stackId, version,
-        RepositoryVersionState.UPGRADED);
-    checkStackVersionState(stackId, version, RepositoryVersionState.UPGRADED);
-
-    assertStateException(stackId, version, RepositoryVersionState.INSTALLED,
-        RepositoryVersionState.UPGRADED);
-    assertStateException(stackId, version,
-        RepositoryVersionState.INSTALL_FAILED, RepositoryVersionState.UPGRADED);
-    assertStateException(stackId, version, RepositoryVersionState.UPGRADING,
-        RepositoryVersionState.UPGRADED);
-    assertStateException(stackId, version,
-        RepositoryVersionState.UPGRADE_FAILED, RepositoryVersionState.UPGRADED);
-    assertStateException(stackId, version, RepositoryVersionState.OUT_OF_SYNC,
-        RepositoryVersionState.UPGRADED);
-
     c1.setDesiredStackVersion(stackId);
     c1.transitionClusterVersion(stackId, version,
         RepositoryVersionState.CURRENT);
@@ -1487,9 +1417,6 @@ public class ClusterTest {
         RepositoryVersionState.INSTALLING);
     c1.transitionClusterVersion(stackId, "0.2",
         RepositoryVersionState.INSTALLED);
-    c1.transitionClusterVersion(stackId, "0.2",
-        RepositoryVersionState.UPGRADING);
-    c1.transitionClusterVersion(stackId, "0.2", RepositoryVersionState.UPGRADED);
     try {
       ClusterVersionDAOMock.failOnCurrentVersionState = true;
       c1.transitionClusterVersion(stackId, "0.2",
@@ -1709,49 +1636,6 @@ public class ClusterTest {
     checkStackVersionState(stackId, stackVersion,
         RepositoryVersionState.INSTALLED);
 
-    // Phase 2: Upgrade stack
-    hv1.setState(RepositoryVersionState.UPGRADING);
-    hostVersionDAO.merge(hv1);
-    c1.recalculateClusterVersionState(repositoryVersionEntity);
-    checkStackVersionState(stackId, stackVersion,
-        RepositoryVersionState.UPGRADING);
-
-    hv1.setState(RepositoryVersionState.UPGRADED);
-    hostVersionDAO.merge(hv1);
-    c1.recalculateClusterVersionState(repositoryVersionEntity);
-    checkStackVersionState(stackId, stackVersion,
-        RepositoryVersionState.UPGRADING);
-    // reset host1 state
-    hv1.setState(RepositoryVersionState.UPGRADING);
-
-    hv2.setState(RepositoryVersionState.UPGRADING);
-    hostVersionDAO.merge(hv2);
-    c1.recalculateClusterVersionState(repositoryVersionEntity);
-    checkStackVersionState(stackId, stackVersion,
-        RepositoryVersionState.UPGRADING);
-
-    hv2.setState(RepositoryVersionState.UPGRADE_FAILED);
-    hostVersionDAO.merge(hv2);
-    c1.recalculateClusterVersionState(repositoryVersionEntity);
-    checkStackVersionState(stackId, stackVersion,
-        RepositoryVersionState.UPGRADE_FAILED);
-    // Retry by going back to UPGRADING
-    c1.transitionClusterVersion(stackId, stackVersion,
-        RepositoryVersionState.UPGRADING);
-
-    hv2.setState(RepositoryVersionState.UPGRADED);
-    hostVersionDAO.merge(hv2);
-    c1.recalculateClusterVersionState(repositoryVersionEntity);
-    checkStackVersionState(stackId, stackVersion,
-        RepositoryVersionState.UPGRADING);
-
-    // Now both hosts are UPGRADED
-    hv1.setState(RepositoryVersionState.UPGRADED);
-    hostVersionDAO.merge(hv1);
-    c1.recalculateClusterVersionState(repositoryVersionEntity);
-    checkStackVersionState(stackId, stackVersion,
-        RepositoryVersionState.UPGRADED);
-
     // Set both hosts to CURRENT
     hv1.setState(RepositoryVersionState.CURRENT);
     hostVersionDAO.merge(hv1);
@@ -1868,11 +1752,6 @@ public class ClusterTest {
         Assert.assertNotNull(repositoryVersion);
         Assert.assertTrue(clusterVersions != null && clusterVersions.size() == 1);
 
-        // First component to report a version should cause the ClusterVersion to go to UPGRADING
-        if (versionedComponentCount == 1 && i < (hostComponentStates.size() -
1)) {
-          Assert.assertEquals(clusterVersions.iterator().next().getState(), RepositoryVersionState.UPGRADING);
-        }
-
         // Last component to report a version should cause the ClusterVersion to go to CURRENT
         if (i == hostComponentStates.size() - 1) {
           Assert.assertEquals(clusterVersions.iterator().next().getState(), RepositoryVersionState.CURRENT);
@@ -1976,28 +1855,13 @@ public class ClusterTest {
         RepositoryVersionEntity repositoryVersion = repositoryVersionDAO.findByStackAndVersion(stackId,
v2);
         Assert.assertNotNull(repositoryVersion);
         Assert.assertTrue(clusterVersions != null && clusterVersions.size() == 2);
-
-        // First component to report a version should cause the ClusterVersion to go to UPGRADING
-        if (versionedComponentCount == 1 && i < (hostComponentStates.size() -
1)) {
-          cv2 = clusterVersionDAO.findByClusterAndStackAndVersion(clusterName, stackId, v2);
-          Assert.assertEquals(cv2.getState(), RepositoryVersionState.UPGRADING);
-        }
       }
     }
 
-    // Last component to report a version should still keep the ClusterVersion in UPGRADING
because
-    // hosts 3 and 5 only have Ganglia and the HostVersion will remain in INSTALLED
-    cv2 = clusterVersionDAO.findByClusterAndStackAndVersion(clusterName, stackId, v2);
-    Assert.assertEquals(cv2.getState(), RepositoryVersionState.UPGRADING);
-
     Collection<HostVersionEntity> v2HostVersions = hostVersionDAO.findByClusterStackAndVersion(clusterName,
stackId, v2);
     Assert.assertEquals(v2HostVersions.size(), clusters.getHostsForCluster(clusterName).size());
     for (HostVersionEntity hve : v2HostVersions) {
-      if (hve.getHostName().equals("h-3") || hve.getHostName().equals("h-5")) {
-        Assert.assertEquals(hve.getState(), RepositoryVersionState.INSTALLED);
-      } else {
-        Assert.assertEquals(hve.getState(), RepositoryVersionState.UPGRADED);
-      }
+      Assert.assertTrue(TERMINAL_VERSION_STATES.contains(hve.getState()));
     }
   }
 
@@ -2101,7 +1965,7 @@ public class ClusterTest {
 
     c1.setCurrentStackVersion(stackId);
     c1.createClusterVersion(stackId, v1, "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     c1.transitionClusterVersion(stackId, v1, RepositoryVersionState.CURRENT);
 
     clusters.mapHostToCluster("h-1", clusterName);
@@ -2124,9 +1988,6 @@ public class ClusterTest {
     c1.createClusterVersion(stackId, v2, "admin",
         RepositoryVersionState.INSTALLING);
     c1.transitionClusterVersion(stackId, v2, RepositoryVersionState.INSTALLED);
-    c1.transitionClusterVersion(stackId, v2, RepositoryVersionState.UPGRADING);
-    c1.transitionClusterVersion(stackId, v2, RepositoryVersionState.UPGRADED);
-
     c1.transitionClusterVersion(stackId, v2, RepositoryVersionState.CURRENT);
 
     entities = hostVersionDAO.findByClusterAndHost(clusterName, "h-3");
@@ -2175,7 +2036,7 @@ public class ClusterTest {
 
     c1.setCurrentStackVersion(stackId);
     c1.createClusterVersion(stackId, v1, "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     c1.transitionClusterVersion(stackId, v1, RepositoryVersionState.CURRENT);
 
     clusters.mapHostToCluster("h-1", clusterName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
index 7cb7679..a0a6444 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
@@ -105,7 +105,7 @@ public class ClustersDeadlockTest {
     cluster = clusters.getCluster(CLUSTER_NAME);
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     // install HDFS
     installService("HDFS");

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
index daf8d12..1b0cf8e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
@@ -260,12 +260,12 @@ public class ClustersTest {
     cluster1.setDesiredStackVersion(stackId);
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster1.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     cluster1.transitionClusterVersion(stackId, stackId.getStackVersion(),
         RepositoryVersionState.CURRENT);
     cluster2.setDesiredStackVersion(stackId);
     cluster2.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     cluster2.transitionClusterVersion(stackId, stackId.getStackVersion(),
         RepositoryVersionState.CURRENT);
 
@@ -354,12 +354,12 @@ public class ClustersTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster1.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     cluster1.transitionClusterVersion(stackId, stackId.getStackVersion(),
         RepositoryVersionState.CURRENT);
     cluster2.setDesiredStackVersion(stackId);
     cluster2.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     cluster2.transitionClusterVersion(stackId, stackId.getStackVersion(),
         RepositoryVersionState.CURRENT);
     clusters.addHost(h1);
@@ -394,7 +394,7 @@ public class ClustersTest {
     cluster.setCurrentStackVersion(stackId);
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     cluster.transitionClusterVersion(stackId, stackId.getStackVersion(),
         RepositoryVersionState.CURRENT);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
index 4845d6f..ff5cbe8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
@@ -110,7 +110,7 @@ public class ConcurrentServiceConfigVersionTest {
     cluster = clusters.getCluster("c1");
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId,
-        stackId.getStackVersion(), "admin", RepositoryVersionState.UPGRADING);
+        stackId.getStackVersion(), "admin", RepositoryVersionState.INSTALLING);
 
     String hostName = "c6401.ambari.apache.org";
     clusters.addHost(hostName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
index 81399a1..7d2ba4d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
@@ -112,7 +112,7 @@ public class ServiceComponentHostConcurrentWriteDeadlockTest {
     cluster = clusters.getCluster("c1");
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId,
-        stackId.getStackVersion(), "admin", RepositoryVersionState.UPGRADING);
+        stackId.getStackVersion(), "admin", RepositoryVersionState.INSTALLING);
 
     Config config1 = configFactory.createNew(cluster, "test-type1", new HashMap<String,
String>(), new HashMap<String,
         Map<String, String>>());

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
index 4248d13..99fc0a1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
@@ -365,7 +365,7 @@ public class HostTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     c1.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     Assert.assertEquals("c1", c1.getClusterName());
     Assert.assertEquals(1, c1.getClusterId());
     clusters.addHost("h1");
@@ -441,7 +441,7 @@ public class HostTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     c1.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
     c1.setDesiredStackVersion(stackId);
     clusters.mapHostToCluster("h1", "c1");
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbef0c14/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
index 62f2cbf..57a7391 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
@@ -133,7 +133,7 @@ public class ServiceComponentHostTest {
     Cluster c1 = clusters.getCluster(clusterName);
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     c1.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
   }
 
   @After
@@ -752,7 +752,7 @@ public class ServiceComponentHostTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     ServiceComponentHost sch1 = createNewServiceComponentHost(cluster, "HDFS", "NAMENODE",
hostName);
     ServiceComponentHost sch2 = createNewServiceComponentHost(cluster, "HDFS", "DATANODE",
hostName);
@@ -977,7 +977,7 @@ public class ServiceComponentHostTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     ServiceComponentHost sch1 = createNewServiceComponentHost(cluster, "HDFS", "NAMENODE",
hostName);
     ServiceComponentHost sch2 = createNewServiceComponentHost(cluster, "HDFS", "DATANODE",
hostName);
@@ -1109,7 +1109,7 @@ public class ServiceComponentHostTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     HostEntity hostEntity = hostDAO.findByName(hostName);
     Assert.assertNotNull(hostEntity);
@@ -1153,7 +1153,7 @@ public class ServiceComponentHostTest {
 
     helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
     cluster.createClusterVersion(stackId, stackId.getStackVersion(), "admin",
-        RepositoryVersionState.UPGRADING);
+        RepositoryVersionState.INSTALLING);
 
     HostEntity hostEntity = hostDAO.findByName(hostName);
     ServiceComponentHost sch1 = createNewServiceComponentHost(cluster, "HDFS", "NAMENODE",
hostName);


Mime
View raw message