PYTHON-3011 Fix test_connections_are_only_returned_once (#781)

This commit is contained in:
Shane Harvey 2021-11-08 17:00:42 -08:00 committed by GitHub
parent e80141ed1c
commit c404150fe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ class TestLB(IntegrationTest):
nconns = len(pool.sockets)
self.db.test.find_one({})
self.assertEqual(len(pool.sockets), nconns)
self.db.test.aggregate([{'$limit': 1}])
list(self.db.test.aggregate([{'$limit': 1}]))
self.assertEqual(len(pool.sockets), nconns)
@client_context.require_load_balancer