Skip to content

Commit

Permalink
Merge pull request #917 from ellert/mongodb-check
Browse files Browse the repository at this point in the history
Check that MongoDB server is responding
  • Loading branch information
minrk authored Dec 9, 2024
2 parents c3d393d + 1b8d62a commit 8d170cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ipyparallel/tests/test_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def mongo_conn(request):
conn_kwargs['port'] = int(os.environ['DB_PORT'])

try:
c = MongoClient(**conn_kwargs)
c = MongoClient(**conn_kwargs, serverSelectionTimeoutMS=2000)
servinfo = c.server_info()
except Exception:
c = None
if c is not None:
Expand Down

0 comments on commit 8d170cb

Please sign in to comment.