Skip to content

Commit

Permalink
Closing sockets in tearDown makes more sense than startUp
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdavis committed Dec 23, 2011
1 parent 0b0d48f commit 02de2e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_shunt.py
Expand Up @@ -42,11 +42,11 @@ def setUp(self):
sleep_time = 1 + (len(self.mongods) * 2)
logging.info('waiting for mongod to start (sleeping %d seconds)' % sleep_time)
time.sleep(sleep_time)
asyncmongo.pool.ConnectionPools.close_idle_connections()


def tearDown(self):
"""teardown method that cleans up child mongod instances, and removes their temporary data files"""
logging.debug('teardown')
asyncmongo.pool.ConnectionPools.close_idle_connections()
for mongod in self.mongods:
logging.debug('killing mongod %s' % mongod.pid)
os.kill(mongod.pid, signal.SIGKILL)
Expand Down

0 comments on commit 02de2e3

Please sign in to comment.