Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
Remove pool cleaner unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
FSX committed Feb 13, 2013
1 parent cb11547 commit ef3cca6
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions tests.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ def set_up(self):
self.db = momoko.Pool( self.db = momoko.Pool(
dsn=dsn, dsn=dsn,
register_hstore=test_hstore, register_hstore=test_hstore,
minconn=1, size=3,
maxconn=10,
cleanup_timeout=0,
callback=self.stop, callback=self.stop,
ioloop=self.io_loop ioloop=self.io_loop
) )
Expand Down Expand Up @@ -215,24 +213,6 @@ def test_transaction_rollback(self):
cursor = self.wait_for_result() cursor = self.wait_for_result()
self.assert_equal(cursor.fetchone(), (0,)) self.assert_equal(cursor.fetchone(), (0,))


def test_pool_cleaner(self):
self.db._clean_pool()
self.assert_equal(len(self.db._pool), 1)

@gen.engine
def func():
yield [
gen.Task(self.db.execute, 'SELECT 1;'),
gen.Task(self.db.execute, 'SELECT 1;'),
gen.Task(self.db.execute, 'SELECT 1;'),
]
self.stop()

self.run_gen(func)
self.assert_equal(len(self.db._pool), 3)
self.db._clean_pool()
self.assert_equal(len(self.db._pool), 1)

def test_op(self): def test_op(self):
@gen.engine @gen.engine
def func(): def func():
Expand Down

0 comments on commit ef3cca6

Please sign in to comment.