diff options
author | Wouter Bolsterlee <uws@xs4all.nl> | 2016-03-27 21:46:42 +0200 |
---|---|---|
committer | Wouter Bolsterlee <uws@xs4all.nl> | 2016-03-27 21:46:42 +0200 |
commit | 9212da0fd4997e462a95f20a8c26182ce51be55e (patch) | |
tree | 7157e2b855fdccfdd5df8b2e6729fd2cfa8081a9 /tests | |
parent | 1ded319c92c3861b2ebbc455f6763d812fc13e55 (diff) | |
download | happybase-9212da0fd4997e462a95f20a8c26182ce51be55e.tar.gz |
Port to thriftpy
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_api.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index 292ee3f..cbfdbd0 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -490,7 +490,7 @@ def test_connection_pool_construction(): def test_connection_pool(): - from thrift.transport.TTransport import TTransportException + from thriftpy.thrift import TException def run(): name = threading.current_thread().name @@ -505,7 +505,7 @@ def test_connection_pool(): if random.random() < .25: print "Introducing random failure" connection.transport.close() - raise TTransportException("Fake transport exception") + raise TException("Fake transport exception") for i in xrange(50): with pool.connection() as connection: @@ -513,7 +513,7 @@ def test_connection_pool(): try: inner_function() - except TTransportException: + except TException: # This error should have been picked up by the # connection pool, and the connection should have # been replaced by a fresh one |