[
https://issues.apache.org/jira/browse/IMPALA-14669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18051095#comment-18051095
]
ASF subversion and git services commented on IMPALA-14669:
----------------------------------------------------------
Commit 14fd2b1bd33a99c9c367771ef1b131eac90d9875 in impala's branch
refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=14fd2b1bd ]
IMPALA-14669: Fix false-positive in test_ext_data_sources.py
test_ext_data_sources.py has several negative tests that use
pytest.raise + match such as test_invalid_postgres_jdbc_table,
test_invalid_postgres_hive_jdbc_table, and
test_invalid_mysql_hive_jdbc_table_properties. This pytest.raise + match
does not work in pytest-2.9.2, and silently pass without actually
matching the expected error message.
On pytest-6.2.5, these tests fail for not finding the match in thrown
exception. The tests are only throwing exception because the CREATE
QUERY sent to Hive instead of Impala, and Hive exception message is not
validated.
This patch modify test_invalid_postgres_jdbc_table to run both CREATE
QUERY and SELECT via Impala and validate error messages coming out of
Impala.
test_invalid_postgres_hive_jdbc_table and
test_invalid_mysql_hive_jdbc_table_properties stays running against
Hive, but the expected error messages are adjusted. None of them
validate error message from Impala because Hive will fail the malformed
CREATE QUERY.
Testing:
- Run and pass test_ext_data_sources.py exhaustively using both
pytest-2.9.2 and pytest-6.2.5
Change-Id: I3f332a36bd0c4a796d3f474be666e4cc1dc46b45
Reviewed-on: http://gerrit.cloudera.org:8080/23843
Reviewed-by: Wenzhe Zhou <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> False-positive in test_ext_data_sources.py
> ------------------------------------------
>
> Key: IMPALA-14669
> URL: https://issues.apache.org/jira/browse/IMPALA-14669
> Project: IMPALA
> Issue Type: Improvement
> Components: Test
> Affects Versions: Impala 5.0.0
> Reporter: Riza Suminto
> Assignee: Riza Suminto
> Priority: Major
>
> test_ext_data_sources.py has several negative tests that use pytest.raise +
> match such as
> test_invalid_postgres_jdbc_table, test_invalid_postgres_hive_jdbc_table, and
> test_invalid_mysql_hive_jdbc_table_properties. This pytest.raise + match does
> not work in pytest-2.9.2, and silently pass without actually matching the
> expected error message.
>
> On pytest-6.2.5, these tests fail for not finding the match in thrown
> exception. The tests are only throwing exception because the CREATE QUERY
> sent to Hive instead of Impala, and Hive exception message is not validated.
> The test should be modified to create malformed JDBC table thorugh Hive, and
> verify that querying such table from Impala will throw correct exception
> message.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]