You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2018/11/23 21:48:05 UTC
[ambari] branch trunk updated: AMBARI-24948. Test ordering issue in
ExecutionCommandWrapperTest. (#2649)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new fd346f5 AMBARI-24948. Test ordering issue in ExecutionCommandWrapperTest. (#2649)
fd346f5 is described below
commit fd346f5fc28c1dfe605c3e53cb039c657ac2a2ab
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Fri Nov 23 22:47:59 2018 +0100
AMBARI-24948. Test ordering issue in ExecutionCommandWrapperTest. (#2649)
---
.../server/actionmanager/ExecutionCommandWrapperTest.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
index a5c6ac1..9cd4716 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
@@ -325,9 +325,9 @@ public class ExecutionCommandWrapperTest {
Cluster cluster = clusters.getCluster(CLUSTER1);
StackId stackId = cluster.getDesiredStackVersion();
- RepositoryVersionEntity repositoryVersion = ormTestHelper.getOrCreateRepositoryVersion(stackId, "0.1-0000");
+ RepositoryVersionEntity repositoryVersion = ormTestHelper.getOrCreateRepositoryVersion(new StackId("HDP", "0.2"), "0.2-0000");
repositoryVersion.setResolved(true); // has build number
- Service service = cluster.getService("HDFS");
+ Service service = cluster.addService("HIVE", repositoryVersion);
service.setDesiredRepositoryVersion(repositoryVersion);
repositoryVersion.addRepoOsEntities(new ArrayList<>());
@@ -342,10 +342,10 @@ public class ExecutionCommandWrapperTest {
executionCommand.setTaskId(1);
executionCommand.setRequestAndStage(1, 1);
executionCommand.setHostname(HOST1);
- executionCommand.setRole("NAMENODE");
+ executionCommand.setRole("HIVE_SERVER");
executionCommand.setRoleParams(Collections.<String, String>emptyMap());
executionCommand.setRoleCommand(RoleCommand.INSTALL);
- executionCommand.setServiceName("HDFS");
+ executionCommand.setServiceName("HIVE");
executionCommand.setCommandType(AgentCommandType.EXECUTION_COMMAND);
executionCommand.setCommandParams(commandParams);
@@ -366,10 +366,10 @@ public class ExecutionCommandWrapperTest {
executionCommand.setTaskId(1);
executionCommand.setRequestAndStage(1, 1);
executionCommand.setHostname(HOST1);
- executionCommand.setRole("NAMENODE");
+ executionCommand.setRole("HIVE_SERVER");
executionCommand.setRoleParams(Collections.<String, String> emptyMap());
executionCommand.setRoleCommand(RoleCommand.START);
- executionCommand.setServiceName("HDFS");
+ executionCommand.setServiceName("HIVE");
executionCommand.setCommandType(AgentCommandType.EXECUTION_COMMAND);
executionCommand.setCommandParams(commandParams);
@@ -379,7 +379,7 @@ public class ExecutionCommandWrapperTest {
processedExecutionCommand = execCommWrap.getExecutionCommand();
commandParams = processedExecutionCommand.getCommandParams();
- Assert.assertEquals("0.1-0000", commandParams.get(KeyNames.VERSION));
+ Assert.assertEquals("0.2-0000", commandParams.get(KeyNames.VERSION));
}
@AfterClass