You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2016/11/18 10:53:35 UTC
[1/2] ambari git commit: AMBARI-18924. testStaleConfigs UT failing as
globals config handling was removed (dgrinenko via dlysnichenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 245cffc3f -> 02f0e3646
refs/heads/trunk 5766783a1 -> eb1411d22
AMBARI-18924. testStaleConfigs UT failing as globals config handling was removed (dgrinenko via dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/02f0e364
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/02f0e364
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/02f0e364
Branch: refs/heads/branch-2.5
Commit: 02f0e36466dd6483da00f9872fd605dbdf442ddb
Parents: 245cffc
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Fri Nov 18 12:52:32 2016 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Fri Nov 18 12:52:32 2016 +0200
----------------------------------------------------------------------
.../svccomphost/ServiceComponentHostTest.java | 30 +++++++++++---------
1 file changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/02f0e364/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 14a8de6..77e5142 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
@@ -753,15 +753,13 @@ public class ServiceComponentHostTest {
Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
- makeConfig(cluster, "global", "version1",
+ makeConfig(cluster, "hdfs-site", "version0",
new HashMap<String,String>() {{
put("a", "b");
- put("dfs_namenode_name_dir", "/foo1"); // HDFS only
- put("mapred_log_dir_prefix", "/foo2"); // MR2 only
}}, new HashMap<String, Map<String,String>>());
Map<String, Map<String, String>> actual = new HashMap<String, Map<String, String>>() {{
- put("global", new HashMap<String,String>() {{ put("tag", "version1"); }});
+ put("hdfs-site", new HashMap<String,String>() {{ put("tag", "version0"); }});
}};
sch1.updateActualConfigs(actual);
@@ -776,7 +774,7 @@ public class ServiceComponentHostTest {
Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
makeConfig(cluster, "hdfs-site", "version1",
- new HashMap<String,String>() {{ put("a", "b"); }}, new HashMap<String, Map<String,String>>());
+ new HashMap<String,String>() {{ put("a1", "b1"); }}, new HashMap<String, Map<String,String>>());
// HDP-x/HDFS/hdfs-site is not on the actual, but it is defined, so it is stale
Assert.assertTrue(sch1.convertToResponse(null).isStaleConfig());
@@ -845,16 +843,20 @@ public class ServiceComponentHostTest {
Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
- // change 'global' property only affecting global/HDFS
- makeConfig(cluster, "global", "version2",
- new HashMap<String,String>() {{
- put("a", "b");
- put("dfs_namenode_name_dir", "/foo3"); // HDFS only
- put("mapred_log_dir_prefix", "/foo2"); // MR2 only
- }}, new HashMap<String, Map<String,String>>());
+ makeConfig(cluster, "mapred-site", "version1",
+ new HashMap<String, String>() {{ put("a", "b"); }},
+ new HashMap<String, Map<String,String>>());
- Assert.assertTrue(sch1.convertToResponse(null).isStaleConfig());
- Assert.assertTrue(sch2.convertToResponse(null).isStaleConfig());
+ actual.put("mapred-site", new HashMap<String, String>() {{ put ("tag", "version1"); }});
+
+ Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
+ Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
+ Assert.assertTrue(sch3.convertToResponse(null).isStaleConfig());
+
+ sch3.updateActualConfigs(actual);
+
+ Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
+ Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
Assert.assertFalse(sch3.convertToResponse(null).isStaleConfig());
// Change core-site property, only HDFS property
[2/2] ambari git commit: AMBARI-18924. testStaleConfigs UT failing as
globals config handling was removed (dgrinenko via dlysnichenko)
Posted by dm...@apache.org.
AMBARI-18924. testStaleConfigs UT failing as globals config handling was removed (dgrinenko via dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eb1411d2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb1411d2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb1411d2
Branch: refs/heads/trunk
Commit: eb1411d228f5fdcdfa59f0bba5a54af74f514f6c
Parents: 5766783
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Fri Nov 18 12:52:32 2016 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Fri Nov 18 12:53:21 2016 +0200
----------------------------------------------------------------------
.../svccomphost/ServiceComponentHostTest.java | 30 +++++++++++---------
1 file changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/eb1411d2/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 14a8de6..77e5142 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
@@ -753,15 +753,13 @@ public class ServiceComponentHostTest {
Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
- makeConfig(cluster, "global", "version1",
+ makeConfig(cluster, "hdfs-site", "version0",
new HashMap<String,String>() {{
put("a", "b");
- put("dfs_namenode_name_dir", "/foo1"); // HDFS only
- put("mapred_log_dir_prefix", "/foo2"); // MR2 only
}}, new HashMap<String, Map<String,String>>());
Map<String, Map<String, String>> actual = new HashMap<String, Map<String, String>>() {{
- put("global", new HashMap<String,String>() {{ put("tag", "version1"); }});
+ put("hdfs-site", new HashMap<String,String>() {{ put("tag", "version0"); }});
}};
sch1.updateActualConfigs(actual);
@@ -776,7 +774,7 @@ public class ServiceComponentHostTest {
Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
makeConfig(cluster, "hdfs-site", "version1",
- new HashMap<String,String>() {{ put("a", "b"); }}, new HashMap<String, Map<String,String>>());
+ new HashMap<String,String>() {{ put("a1", "b1"); }}, new HashMap<String, Map<String,String>>());
// HDP-x/HDFS/hdfs-site is not on the actual, but it is defined, so it is stale
Assert.assertTrue(sch1.convertToResponse(null).isStaleConfig());
@@ -845,16 +843,20 @@ public class ServiceComponentHostTest {
Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
- // change 'global' property only affecting global/HDFS
- makeConfig(cluster, "global", "version2",
- new HashMap<String,String>() {{
- put("a", "b");
- put("dfs_namenode_name_dir", "/foo3"); // HDFS only
- put("mapred_log_dir_prefix", "/foo2"); // MR2 only
- }}, new HashMap<String, Map<String,String>>());
+ makeConfig(cluster, "mapred-site", "version1",
+ new HashMap<String, String>() {{ put("a", "b"); }},
+ new HashMap<String, Map<String,String>>());
- Assert.assertTrue(sch1.convertToResponse(null).isStaleConfig());
- Assert.assertTrue(sch2.convertToResponse(null).isStaleConfig());
+ actual.put("mapred-site", new HashMap<String, String>() {{ put ("tag", "version1"); }});
+
+ Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
+ Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
+ Assert.assertTrue(sch3.convertToResponse(null).isStaleConfig());
+
+ sch3.updateActualConfigs(actual);
+
+ Assert.assertFalse(sch1.convertToResponse(null).isStaleConfig());
+ Assert.assertFalse(sch2.convertToResponse(null).isStaleConfig());
Assert.assertFalse(sch3.convertToResponse(null).isStaleConfig());
// Change core-site property, only HDFS property