You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2018/11/07 17:32:41 UTC

kudu git commit: python: make test_scantoken more robust to exceptions

Repository: kudu
Updated Branches:
  refs/heads/master aa20ef057 -> af00c4c9b


python: make test_scantoken more robust to exceptions

One of my precommit tests failed with:

  22:49:05 kudu/tests/test_client.py .............................
  22:49:06 kudu/tests/test_scanner.py ........................
  22:49:08 kudu/tests/test_scantoken.py ..Build timed out (after 50 minutes). Marking the build as failed.
  23:39:08 Build was aborted

I don't know why this happened, but looking at commit 1d928951e, it seems
like if pool.map() raised an exception, we wouldn't close or join the pool,
which would lead to the same test hanging behavior as before. I don't know
how or why pool.map() raised an exception, but this will hopefully surface
the actual root cause.

Change-Id: I9b5a70d6b5f115cc4de740ded6ecc48574b9c707
Reviewed-on: http://gerrit.cloudera.org:8080/11863
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>


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

Branch: refs/heads/master
Commit: af00c4c9b86772e8d26608b21774e7fc21a88425
Parents: aa20ef0
Author: Adar Dembo <ad...@cloudera.com>
Authored: Fri Nov 2 09:06:57 2018 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Wed Nov 7 17:32:24 2018 +0000

----------------------------------------------------------------------
 python/kudu/tests/test_scantoken.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/af00c4c9/python/kudu/tests/test_scantoken.py
----------------------------------------------------------------------
diff --git a/python/kudu/tests/test_scantoken.py b/python/kudu/tests/test_scantoken.py
index 37e7f7d..c453659 100644
--- a/python/kudu/tests/test_scantoken.py
+++ b/python/kudu/tests/test_scantoken.py
@@ -52,9 +52,11 @@ class TestScanToken(TestScanBase):
 
         # Begin process pool
         pool = Pool(len(input))
-        results = pool.map(_get_scan_token_results, input)
-        pool.close()
-        pool.join()
+        try:
+            results = pool.map(_get_scan_token_results, input)
+        finally:
+            pool.close()
+            pool.join()
 
         # Validate results
         actual_tuples = []