Permalink
Browse files

Closing sockets in tearDown makes more sense than startUp

  • Loading branch information...
1 parent 0b0d48f commit 02de2e315b057f859f414c1bfbc59b21b2b5b215 @ajdavis ajdavis committed Dec 15, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/test_shunt.py
View
4 test/test_shunt.py
@@ -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)

0 comments on commit 02de2e3

Please sign in to comment.