Repository: ambari Updated Branches: refs/heads/trunk 382eba15e -> 3b30de0a8
AMBARI-18337: Syntax Error in Ambari HAWQ Unit test with Python 2.6 (Masahiro Tanaka via lavjain) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3b30de0a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3b30de0a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3b30de0a Branch: refs/heads/trunk Commit: 3b30de0a8ad939768e9194fb63ef19f07eaabaee Parents: 382eba1 Author: ljainpivotalio <lj...@pivotal.io> Authored: Tue Sep 20 14:34:14 2016 -0700 Committer: ljainpivotalio <lj...@pivotal.io> Committed: Tue Sep 20 14:34:14 2016 -0700 ---------------------------------------------------------------------- .../python/common-services/HAWQ/test_service_advisor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3b30de0a/ambari-server/src/test/python/common-services/HAWQ/test_service_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/HAWQ/test_service_advisor.py b/ambari-server/src/test/python/common-services/HAWQ/test_service_advisor.py index 71c109f..b9e542d 100644 --- a/ambari-server/src/test/python/common-services/HAWQ/test_service_advisor.py +++ b/ambari-server/src/test/python/common-services/HAWQ/test_service_advisor.py @@ -643,7 +643,7 @@ class TestHAWQ200ServiceAdvisor(TestCase): recommendations["recommendations"]["blueprint"]["host_groups"]] for sublist in componentsListList: hostComponents = [item["name"] for item in sublist] - self.assertFalse({'HAWQMASTER', 'HAWQSTANDBY'}.issubset(hostComponents)) + self.assertFalse(set(['HAWQMASTER', 'HAWQSTANDBY']).issubset(hostComponents)) def test_createComponentLayoutRecommendations_hawq_1_Host(self): @@ -721,7 +721,7 @@ class TestHAWQ200ServiceAdvisor(TestCase): ] } - hawqSegmentHosts = {"c6401.ambari.apache.org", "c6402.ambari.apache.org", "c6403.ambari.apache.org"} + hawqSegmentHosts = set(["c6401.ambari.apache.org", "c6402.ambari.apache.org", "c6403.ambari.apache.org"]) self.insertHAWQServiceAdvisorInfo(services) recommendations = self.serviceAdvisor.createComponentLayoutRecommendations(services, hosts) hostNames = self.getHostsFromRecommendations(recommendations, "HAWQSEGMENT") @@ -766,7 +766,7 @@ class TestHAWQ200ServiceAdvisor(TestCase): ] } - hawqSegmentHosts = {"c6401.ambari.apache.org", "c6403.ambari.apache.org"} + hawqSegmentHosts = set(["c6401.ambari.apache.org", "c6403.ambari.apache.org"]) self.insertHAWQServiceAdvisorInfo(services) recommendations = self.serviceAdvisor.createComponentLayoutRecommendations(services, hosts) hostNames = self.getHostsFromRecommendations(recommendations, "HAWQSEGMENT") @@ -826,7 +826,7 @@ class TestHAWQ200ServiceAdvisor(TestCase): ] } - hawqSegmentHosts = {"c6402.ambari.apache.org"} + hawqSegmentHosts = set(["c6402.ambari.apache.org"]) self.insertHAWQServiceAdvisorInfo(services) recommendations = self.serviceAdvisor.createComponentLayoutRecommendations(services, hosts) hostNames = self.getHostsFromRecommendations(recommendations, "HAWQSEGMENT") @@ -1326,4 +1326,4 @@ class TestHAWQ200ServiceAdvisor(TestCase): configurations["core-site"]["properties"].pop("ipc.server.listen.queue.size") problems = self.serviceAdvisor.validateCORESiteConfigurations(configurations["core-site"]["properties"], defaults, configurations, services, hosts) self.assertEqual(len(problems), 1) - self.assertEqual(problems[0], expected) \ No newline at end of file + self.assertEqual(problems[0], expected)