We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 897f28c + e41ecc4 commit 4f29615Copy full SHA for 4f29615
src/pytest_mock_resources/container/mongo.py
@@ -40,10 +40,10 @@ def ports(self):
40
41
def check_fn(self):
42
try:
43
- client = pymongo.MongoClient(self.host, self.port)
+ client = pymongo.MongoClient(self.host, self.port, timeoutMS=1000)
44
db = client[self.root_database]
45
db.command("ismaster")
46
- except pymongo.errors.ConnectionFailure:
+ except pymongo.errors.PyMongoError:
47
raise ContainerCheckFailed(
48
f"Unable to connect to a presumed MongoDB test container via given config: {self}"
49
)
0 commit comments