You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by la...@apache.org on 2016/09/20 21:33:04 UTC

ambari git commit: AMBARI-18337: Syntax Error in Ambari HAWQ Unit test with Python 2.6 (Masahiro Tanaka via lavjain)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 14e44bfd2 -> ef837ba14


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

Branch: refs/heads/branch-2.5
Commit: ef837ba141c74b1db2497217995205e5d9340432
Parents: 14e44bf
Author: ljainpivotalio <lj...@pivotal.io>
Authored: Tue Sep 20 14:32:56 2016 -0700
Committer: ljainpivotalio <lj...@pivotal.io>
Committed: Tue Sep 20 14:32:56 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/ef837ba1/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)