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 2018/04/25 20:06:47 UTC

impala git commit: IMPALA-6902: Tighten udf test to look for crashes

Repository: impala
Updated Branches:
  refs/heads/master 1b706fb32 -> b56ac8f0a


IMPALA-6902: Tighten udf test to look for crashes

test_native_functions_race assumes that any exception
is grounds for failing the test. However, the flake described
in IMPALA-6902 shows an example of an exception that causes
a false negative (it should be ignored). This change tightens
the test to fail when an impalad crashes, which was the original
intent of the test.

Tests:
- re-ran test_udfs.py

Change-Id: I7780ff328fde5cf462cf718a1467b8a032d2c17b
Reviewed-on: http://gerrit.cloudera.org:8080/10180
Reviewed-by: Thomas Tauber-Marshall <tm...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/b56ac8f0
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/b56ac8f0
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/b56ac8f0

Branch: refs/heads/master
Commit: b56ac8f0a0888f8130fa8e5a6f6ed184f2538128
Parents: 1b706fb
Author: Vuk Ercegovac <ve...@cloudera.com>
Authored: Tue Apr 24 14:14:27 2018 -0700
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Wed Apr 25 07:28:40 2018 +0000

----------------------------------------------------------------------
 tests/query_test/test_udfs.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/b56ac8f0/tests/query_test/test_udfs.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_udfs.py b/tests/query_test/test_udfs.py
index dc5491b..902914a 100644
--- a/tests/query_test/test_udfs.py
+++ b/tests/query_test/test_udfs.py
@@ -324,6 +324,10 @@ class TestUdfExecution(TestUdfBase):
     drop_another_fn = """drop function if exists {0}.other(float)"""
     udf_path = get_fs_path('/test-warehouse/libTestUdfs.so')
 
+    # Tracks number of impalads prior to tests to check that none have crashed.
+    cluster = ImpalaCluster()
+    exp_num_impalads = len(cluster.impalads)
+
     setup_client = self.create_impala_client()
     setup_query = create_fn_to_use.format(unique_database, udf_path)
     try:
@@ -372,9 +376,11 @@ class TestUdfExecution(TestUdfBase):
     # join all threads.
     for t in runner_threads: t.join();
 
-    # Check for any errors.
     for e in errors: print e
-    assert len(errors) == 0
+
+    # Checks that no impalad has crashed.
+    cluster.refresh()
+    assert len(cluster.impalads) == exp_num_impalads
 
   def test_ir_functions(self, vector, unique_database):
     if vector.get_value('exec_option')['disable_codegen']: