IMPALA-7690: Make test_pool_config_change_while_queued compatible with python 2.6
The ElementTree XML API used in test_pool_config_change_while_queued used iter() which was added in python 2.7. Switching it to getiterator() made it compatible with python 2.6. Change-Id: Id2593609e5be288054d1361f0fe57580e17ea042 Reviewed-on: http://gerrit.cloudera.org:8080/11660 Reviewed-by: Pooja Nilangekar <[email protected]> Reviewed-by: Michael Brown <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/impala/repo Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/e65ac1a4 Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/e65ac1a4 Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/e65ac1a4 Branch: refs/heads/master Commit: e65ac1a4341acfce7c1afc08c0c0566ee0ca50ab Parents: 21f521a Author: Bikramjeet Vig <[email protected]> Authored: Thu Oct 11 12:29:00 2018 -0700 Committer: Impala Public Jenkins <[email protected]> Committed: Fri Oct 12 01:28:07 2018 +0000 ---------------------------------------------------------------------- tests/common/resource_pool_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/impala/blob/e65ac1a4/tests/common/resource_pool_config.py ---------------------------------------------------------------------- diff --git a/tests/common/resource_pool_config.py b/tests/common/resource_pool_config.py index adab034..b160163 100644 --- a/tests/common/resource_pool_config.py +++ b/tests/common/resource_pool_config.py @@ -83,7 +83,7 @@ class ResourcePoolConfig(object): def __find_xml_node(self, xml_root, pool_name, pool_attribute): """Returns the xml node corresponding to the 'pool_attribute' for the 'pool_name'""" - for property in xml_root.iter('property'): + for property in xml_root.getiterator('property'): try: name = property.find('name').text # eg. of name = impala.admission-control.max-query-mem-limit-bytes.root.pool_name
