IMPALA-4434: In Python, ''.split('\n') is [''], which has length 1

This test simply may have never been run in GMT or UTC - it appears to
have an easy-to-make off-by-one error.

Change-Id: Iac4943085b0693deb380499cd0e141eb672bead8
Reviewed-on: http://gerrit.cloudera.org:8080/5061
Reviewed-by: Jim Apple <jbapple@cloudera.com>
Tested-by: Internal Jenkins
This commit is contained in:
Jim Apple
2016-11-12 18:56:40 -08:00
committed by Internal Jenkins
parent 91b5264e52
commit b3cbc960a7

View File

@@ -93,8 +93,10 @@ class TestHiveParquetTimestampConversion(CustomClusterTestSuite):
WHERE h.timestamp_col != FROM_UTC_TIMESTAMP(i.timestamp_col, '%s')
""" % tz_name)\
.get_data()
expected_row_count = 0 if tz_name in ("UTC", "GMT") else 10000
assert len(data.split('\n')) == expected_row_count
if tz_name in ("UTC", "GMT"):
assert len(data) == 0
else:
assert len(data.split('\n')) == 10000
# A value should either stay null or stay not null.
data = self.execute_query_expect_success(self.client, """
SELECT h.id, h.day, h.timestamp_col, i.timestamp_col