IMPALA-7840: add missing error to test_concurrent_schema_change

test_concurrent_schema_change runs a series of alters and inserts on
the same Kudu table concurrently to ensure that Impala can handle this
without crashing.

There is a list of expected error messages in the test. One possible
legitimate error is missing, causing the test to sometimes be flaky.

This patch adds that error message to the test.

Change-Id: Ibc01e1244e05be30343c05b5a0f8676f4d4603d2
Reviewed-on: http://gerrit.cloudera.org:8080/11913
Reviewed-by: Thomas Marshall <[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/4a100960
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/4a100960
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/4a100960

Branch: refs/heads/branch-3.1.0
Commit: 4a10096064b95bff4d25d2af3c393794ec4e328b
Parents: 1d412a0
Author: Thomas Tauber-Marshall <[email protected]>
Authored: Thu Nov 8 22:44:01 2018 +0000
Committer: Zoltan Borok-Nagy <[email protected]>
Committed: Tue Nov 13 12:52:36 2018 +0100

----------------------------------------------------------------------
 tests/query_test/test_kudu.py | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/4a100960/tests/query_test/test_kudu.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_kudu.py b/tests/query_test/test_kudu.py
index 005fa63..5936649 100644
--- a/tests/query_test/test_kudu.py
+++ b/tests/query_test/test_kudu.py
@@ -437,14 +437,18 @@ class TestKuduOperations(KuduTestSuite):
     for error in insert_thread.errors:
       msg = str(error)
       # The first two are AnalysisExceptions, the next two come from 
KuduTableSink::Open()
-      # if the schema has changed since analysis, the last comes from the Kudu 
server if
+      # if the schema has changed since analysis, the rest come from the Kudu 
server if
       # the schema changes between KuduTableSink::Open() and when the write 
ops are sent.
-      assert "has fewer columns (1) than the SELECT / VALUES clause returns 
(2)" in msg \
-        or "(type: TINYINT) is not compatible with column 'col1' (type: 
STRING)" in msg \
-        or "has fewer columns than expected." in msg \
-        or "Column col1 has unexpected type." in msg \
-        or "Client provided column col1[int64 NULLABLE] not present in tablet" 
in msg \
-        or "Client provided column col1 INT64 NULLABLE not present in tablet"
+      possible_errors = [
+        "has fewer columns (1) than the SELECT / VALUES clause returns (2)",
+        "(type: TINYINT) is not compatible with column 'col1' (type: STRING)",
+        "has fewer columns than expected.",
+        "Column col1 has unexpected type.",
+        "Client provided column col1[int64 NULLABLE] not present in tablet",
+        "Client provided column col1 INT64 NULLABLE not present in tablet",
+        "The column 'col1' must have type string NULLABLE found int64 NULLABLE"
+      ]
+      assert any(err in msg for err in possible_errors)
 
   def _retry_query(self, cursor, query, expected):
     retries = 0

Reply via email to