kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/4] kudu git commit: [python] Fix undefined TimeoutError in tests
Date Mon, 12 Jun 2017 23:22:43 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 681f05b43 -> 7ac7762ff


[python] Fix undefined TimeoutError in tests

The tests use TimeoutError, which is not defined in Python 2
(but is in Python 3). I added a minimal definition of
TimeoutError.

Change-Id: I1c6c634803cf5cc8f083f4480606aed10f86db91
Reviewed-on: http://gerrit.cloudera.org:8080/7078
Tested-by: Kudu Jenkins
Reviewed-by: Will Berkeley <wdberkeley@gmail.com>


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

Branch: refs/heads/master
Commit: 636e2a9d29ff9a80ee601717f6789da972acd123
Parents: 681f05b
Author: Will Berkeley <wdberkeley@apache.org>
Authored: Mon Jun 5 09:53:29 2017 -0700
Committer: Will Berkeley <wdberkeley@gmail.com>
Committed: Mon Jun 12 18:57:55 2017 +0000

----------------------------------------------------------------------
 python/kudu/tests/common.py       | 5 +++++
 python/kudu/tests/test_scanner.py | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/636e2a9d/python/kudu/tests/common.py
----------------------------------------------------------------------
diff --git a/python/kudu/tests/common.py b/python/kudu/tests/common.py
index 1b606aa..c6b1b7d 100644
--- a/python/kudu/tests/common.py
+++ b/python/kudu/tests/common.py
@@ -30,6 +30,11 @@ import socket
 import kudu
 from kudu.client import Partitioning
 
+# There's no built-in timeout error in Python 2.
+# See https://stackoverflow.com/questions/2281850.
+class TimeoutError(Exception):
+    pass
+
 class KuduTestBase(object):
 
     """

http://git-wip-us.apache.org/repos/asf/kudu/blob/636e2a9d/python/kudu/tests/test_scanner.py
----------------------------------------------------------------------
diff --git a/python/kudu/tests/test_scanner.py b/python/kudu/tests/test_scanner.py
index b483b38..2db0411 100644
--- a/python/kudu/tests/test_scanner.py
+++ b/python/kudu/tests/test_scanner.py
@@ -20,7 +20,7 @@ from __future__ import division
 
 from kudu.compat import unittest
 from kudu.tests.util import TestScanBase
-from kudu.tests.common import KuduTestBase
+from kudu.tests.common import KuduTestBase, TimeoutError
 import kudu
 import datetime
 import time


Mime
View raw message