remove some debug logging

This commit is contained in:
Noah Levitt 2015-09-22 01:06:25 +00:00
parent 50df439706
commit c4314e6cdb
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ class RethinkerWrapper:
for x in result:
yield x
finally:
self.logger.info("iterator finished, closing connection %s", conn)
result.close()
conn.close()
g = gen()
# Start executing the generator, leaving off after the
@ -45,7 +45,6 @@ class RethinkerWrapper:
pass
finally:
if not is_iter:
self.logger.info("closing connection %s", conn)
conn.close(noreply_wait=False)
class Rethinker(object):

View File

@ -13,7 +13,7 @@ class RethinkerForTesting(rethinkstuff.Rethinker):
def _random_server_connection(self):
self.last_conn = super(RethinkerForTesting, self)._random_server_connection()
logging.info("self.last_conn=%s", self.last_conn)
# logging.info("self.last_conn=%s", self.last_conn)
return self.last_conn
def test_rethinker():
@ -61,5 +61,6 @@ def test_rethinker():
assert isinstance(result, types.GeneratorType)
result = None
gc.collect()
# connection should be closed after result is garbage-collected
assert not r.last_conn.is_open()