You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2019/06/25 15:45:18 UTC

[impala] 06/20: test_recover_partitions.py had asserts that were always true.

This is an automated email from the ASF dual-hosted git repository.

tarmstrong pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 9e089ffe5b06467ade26b9063a1fff0ae7a83ba5
Author: Philip Zeyliger <ph...@cloudera.com>
AuthorDate: Thu Jul 19 10:09:11 2018 -0700

    test_recover_partitions.py had asserts that were always true.
    
    Running "python -m compileall" discovered some assertions that
    were always true. I've re-instated them to their true spirit.
    
    Change-Id: Id49171304b853f15c43c8cfca066b6694c4a669f
    Reviewed-on: http://gerrit.cloudera.org:8080/10993
    Reviewed-by: Vuk Ercegovac <ve...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 tests/metadata/test_recover_partitions.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/metadata/test_recover_partitions.py b/tests/metadata/test_recover_partitions.py
index 1894676..9ba4164 100644
--- a/tests/metadata/test_recover_partitions.py
+++ b/tests/metadata/test_recover_partitions.py
@@ -346,12 +346,11 @@ class TestRecoverPartitions(ImpalaTestSuite):
         self.client, "ALTER TABLE %s RECOVER PARTITIONS" % FQ_TBL_NAME)
       result = self.execute_query_expect_success(
         self.client, "SHOW PARTITIONS %s" % FQ_TBL_NAME)
-      assert (self.count_partition(result.data) == 1,
-        "ALTER TABLE %s RECOVER PARTITIONS produced more than 1 partitions" %
-        FQ_TBL_NAME)
-      assert (self.count_value('p=100%25', result.data) == 1,
-        "ALTER TABLE %s RECOVER PARTITIONS failed to handle encoded partitioned value" %
-        FQ_TBL_NAME)
+      assert self.count_partition(result.data) == 1, \
+        "ALTER TABLE %s RECOVER PARTITIONS produced more than 1 partitions" % FQ_TBL_NAME
+      assert self.count_value('p=100%25', result.data) == 1, \
+        "ALTER TABLE %s RECOVER PARTITIONS failed to handle encoded partitioned value" % \
+        FQ_TBL_NAME
 
   @SkipIfLocal.hdfs_client
   @SkipIfS3.empty_directory