Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 8f7cbeb18 -> 0a992d667


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/0a992d66
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a992d66
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a992d66

Branch: refs/heads/branch-2.4
Commit: 0a992d667ab485050fb14984310e39020eb6b8b7
Parents: 8f7cbeb
Author: ljainpivotalio <lj...@pivotal.io>
Authored: Tue Sep 20 14:33:39 2016 -0700
Committer: ljainpivotalio <lj...@pivotal.io>
Committed: Tue Sep 20 14:33:39 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/0a992d66/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)

Reply via email to