PYTHON-3577 Fix test_aggregate_out on 4.0 replica set (#1146)
This commit is contained in:
parent
b492263826
commit
540562a606
@ -122,6 +122,8 @@ class TestLB(IntegrationTest):
|
||||
session = client.start_session()
|
||||
session.start_transaction()
|
||||
client.test_session_gc.test.find_one({}, session=session)
|
||||
# Cleanup the transaction left open on the server.
|
||||
self.addCleanup(self.client.admin.command, "killSessions", [session.session_id])
|
||||
if client_context.load_balancer:
|
||||
self.assertEqual(pool.active_sockets, 1) # Pinned.
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import unittest
|
||||
sys.path[0:0] = [""]
|
||||
|
||||
from test import IntegrationTest, client_context
|
||||
from test.utils import OvertCommandListener, rs_or_single_client, single_client
|
||||
from test.utils import OvertCommandListener, rs_or_single_client
|
||||
|
||||
from bson.son import SON
|
||||
from pymongo.errors import OperationFailure
|
||||
@ -35,7 +35,7 @@ class TestReadConcern(IntegrationTest):
|
||||
def setUpClass(cls):
|
||||
super(TestReadConcern, cls).setUpClass()
|
||||
cls.listener = OvertCommandListener()
|
||||
cls.client = single_client(event_listeners=[cls.listener])
|
||||
cls.client = rs_or_single_client(event_listeners=[cls.listener])
|
||||
cls.db = cls.client.pymongo_test
|
||||
client_context.client.pymongo_test.create_collection("coll")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user