minor: oops forgot to update both places

This commit is contained in:
Mike Dirolf 2009-11-23 16:52:27 -05:00
parent e631ddcc98
commit 2a1c6968bc
2 changed files with 6 additions and 4 deletions

View File

@ -135,12 +135,13 @@ class TestConnection(unittest.TestCase):
def test_low_network_timeout(self):
c = None
i = 0
while c is None and i < 10:
n = 10
while c is None and i < n:
try:
c = Connection(self.host, self.port, network_timeout=0.0001)
except AutoReconnect:
i += 1
if i == 1000:
if i == n:
raise SkipTest()
coll = c.pymongo_test.test

View File

@ -155,12 +155,13 @@ class TestThreads(unittest.TestCase):
def test_low_network_timeout(self):
db = None
i = 0
while db is None and i < 10:
n = 10
while db is None and i < n:
try:
db = get_connection(network_timeout=0.0001, timeout=-1).pymongo_test
except AutoReconnect:
i += 1
if i == 1000:
if i == n:
raise SkipTest()
threads = []