When checking the Mongo server has come up properly, the MongoTestServer
class first creates a pymongo.MongoClient with a short timeout to avoid
waiting a long time in the failure case. After this it creates another
client with the default timeouts, but prior to this change, the initial
client is not closed.
This change explicitly closes the initial client after use.
When checking the Mongo server has come up properly, the
MongoTestServer
class first creates apymongo.MongoClient
with a short timeout to avoid waiting a long time in the failure case. After this it creates another client with the default timeouts, but prior to this change, the initial client is not closed.This change explicitly closes the initial client after use.