Repository: ambari Updated Branches: refs/heads/trunk 1ea1577c9 -> 600f1afcd
http://git-wip-us.apache.org/repos/asf/ambari/blob/600f1afc/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java b/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java index 0a381f9..dd2a519 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java @@ -89,10 +89,10 @@ public class TestStagePlanner { Stage stage = StageUtils.getATestStage(1, 1, "host1", "", ""); stage.addHostRoleExecutionCommand("host2", Role.HBASE_MASTER, RoleCommand.START, new ServiceComponentHostStartEvent("HBASE_MASTER", - "host2", now), "cluster1", "HBASE", false); + "host2", now), "cluster1", "HBASE"); stage.addHostRoleExecutionCommand("host3", Role.ZOOKEEPER_SERVER, RoleCommand.START, new ServiceComponentHostStartEvent("ZOOKEEPER_SERVER", - "host3", now), "cluster1", "ZOOKEEPER", false); + "host3", now), "cluster1", "ZOOKEEPER"); System.out.println(stage.toString()); rg.build(stage); @@ -115,37 +115,37 @@ public class TestStagePlanner { Stage stage = StageUtils.getATestStage(1, 1, "host1", "", ""); stage.addHostRoleExecutionCommand("host11", Role.SECONDARY_NAMENODE, RoleCommand.START, new ServiceComponentHostStartEvent("SECONDARY_NAMENODE", - "host11", now), "cluster1", "HDFS", false); + "host11", now), "cluster1", "HDFS"); stage.addHostRoleExecutionCommand("host2", Role.HBASE_MASTER, RoleCommand.START, new ServiceComponentHostStartEvent("HBASE_MASTER", - "host2", now), "cluster1", "HBASE", false); + "host2", now), "cluster1", "HBASE"); stage.addHostRoleExecutionCommand("host3", Role.ZOOKEEPER_SERVER, RoleCommand.START, new ServiceComponentHostStartEvent("ZOOKEEPER_SERVER", - "host3", now), "cluster1", "ZOOKEEPER", false); + "host3", now), "cluster1", "ZOOKEEPER"); stage.addHostRoleExecutionCommand("host4", Role.DATANODE, RoleCommand.START, new ServiceComponentHostStartEvent("DATANODE", - "host4", now), "cluster1", "HDFS", false); + "host4", now), "cluster1", "HDFS"); stage.addHostRoleExecutionCommand("host4", Role.HBASE_REGIONSERVER, RoleCommand.START, new ServiceComponentHostStartEvent("HBASE_REGIONSERVER", - "host4", now), "cluster1", "HBASE", false); + "host4", now), "cluster1", "HBASE"); stage.addHostRoleExecutionCommand("host4", Role.TASKTRACKER, RoleCommand.START, new ServiceComponentHostStartEvent("TASKTRACKER", - "host4", now), "cluster1", "MAPREDUCE", false); + "host4", now), "cluster1", "MAPREDUCE"); stage.addHostRoleExecutionCommand("host5", Role.JOBTRACKER, RoleCommand.START, new ServiceComponentHostStartEvent("JOBTRACKER", - "host5", now), "cluster1", "MAPREDUCE", false); + "host5", now), "cluster1", "MAPREDUCE"); stage.addHostRoleExecutionCommand("host6", Role.OOZIE_SERVER, RoleCommand.START, new ServiceComponentHostStartEvent("OOZIE_SERVER", - "host6", now), "cluster1", "OOZIE", false); + "host6", now), "cluster1", "OOZIE"); stage.addHostRoleExecutionCommand("host7", Role.WEBHCAT_SERVER, RoleCommand.START, new ServiceComponentHostStartEvent("WEBHCAT_SERVER", - "host7", now), "cluster1", "WEBHCAT", false); + "host7", now), "cluster1", "WEBHCAT"); stage.addHostRoleExecutionCommand("host4", Role.GANGLIA_MONITOR, RoleCommand.START, new ServiceComponentHostStartEvent("GANGLIA_MONITOR", - "host4", now), "cluster1", "GANGLIA", false); + "host4", now), "cluster1", "GANGLIA"); stage.addHostRoleExecutionCommand("host9", Role.GANGLIA_SERVER, RoleCommand.START, new ServiceComponentHostStartEvent("GANGLIA_SERVER", - "host9", now), "cluster1", "GANGLIA", false); + "host9", now), "cluster1", "GANGLIA"); System.out.println(stage.toString()); rg.build(stage); System.out.println(rg.stringifyGraph()); http://git-wip-us.apache.org/repos/asf/ambari/blob/600f1afc/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java index cd68dc1..f8d061a 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java @@ -118,7 +118,6 @@ public class UpgradeCatalog200Test { Capture<DBAccessor.DBColumnInfo> hostComponentStateSecurityStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>(); Capture<DBAccessor.DBColumnInfo> hostComponentDesiredStateSecurityStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>(); Capture<DBAccessor.DBColumnInfo> hostRoleCommandRetryColumnCapture = new Capture<DBAccessor.DBColumnInfo>(); - Capture<DBAccessor.DBColumnInfo> stageSkippableColumnCapture = new Capture<DBAccessor.DBColumnInfo>(); Capture<DBAccessor.DBColumnInfo> viewparameterLabelColumnCapture = new Capture<DBAccessor.DBColumnInfo>(); Capture<DBAccessor.DBColumnInfo> viewparameterPlaceholderColumnCapture = new Capture<DBAccessor.DBColumnInfo>(); @@ -157,10 +156,6 @@ public class UpgradeCatalog200Test { dbAccessor.addColumn(eq("host_role_command"), capture(hostRoleCommandRetryColumnCapture)); - // Stage skippable - dbAccessor.addColumn(eq("stage"), - capture(stageSkippableColumnCapture)); - // Host Component State: security State dbAccessor.addColumn(eq("hostcomponentstate"), capture(hostComponentStateSecurityStateColumnCapture)); @@ -235,14 +230,6 @@ public class UpgradeCatalog200Test { assertEquals(0, upgradeRetryColumn.getDefaultValue()); assertFalse(upgradeRetryColumn.isNullable()); - // Verify added column in host_role_command table - DBAccessor.DBColumnInfo upgradeSkippableColumn = stageSkippableColumnCapture.getValue(); - assertEquals("skippable", upgradeSkippableColumn.getName()); - assertEquals(1, (int) upgradeSkippableColumn.getLength()); - assertEquals(Integer.class, upgradeSkippableColumn.getType()); - assertEquals(0, upgradeSkippableColumn.getDefaultValue()); - assertFalse(upgradeSkippableColumn.isNullable()); - // verify security_state columns verifyComponentSecurityStateColumn(hostComponentStateSecurityStateColumnCapture); verifyComponentSecurityStateColumn(hostComponentDesiredStateSecurityStateColumnCapture);
