Skip to content

Commit 8d170cb

Browse files
authored
Merge pull request #917 from ellert/mongodb-check
Check that MongoDB server is responding
2 parents c3d393d + 1b8d62a commit 8d170cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ipyparallel/tests/test_mongodb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def mongo_conn(request):
3131
conn_kwargs['port'] = int(os.environ['DB_PORT'])
3232

3333
try:
34-
c = MongoClient(**conn_kwargs)
34+
c = MongoClient(**conn_kwargs, serverSelectionTimeoutMS=2000)
35+
servinfo = c.server_info()
3536
except Exception:
3637
c = None
3738
if c is not None:

0 commit comments

Comments
 (0)