diff options
author | Blake Oler <blake.oler@mongodb.com> | 2018-10-22 13:01:18 -0400 |
---|---|---|
committer | Blake Oler <blake.oler@mongodb.com> | 2018-12-07 12:01:57 -0500 |
commit | 4aecec9cc78209b12ba12bdec9a22fa3daad1777 (patch) | |
tree | 2d3be9538e726ae1f31f14e1f68d5ad87eaad3ea | |
parent | 19cb92b33ae83fc8adb046232c3e5b2f53d2a564 (diff) | |
download | mongo-4aecec9cc78209b12ba12bdec9a22fa3daad1777.tar.gz |
SERVER-37511 Ensure sessions collection is created in replica set fixture
(cherry picked from commit 6c5d1761688ea0c8e13fe62afb3574b5326ae9e6)
-rw-r--r-- | buildscripts/resmokelib/testing/fixtures/replicaset.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/buildscripts/resmokelib/testing/fixtures/replicaset.py b/buildscripts/resmokelib/testing/fixtures/replicaset.py index b1966e4ed59..5f5e1568e4a 100644 --- a/buildscripts/resmokelib/testing/fixtures/replicaset.py +++ b/buildscripts/resmokelib/testing/fixtures/replicaset.py @@ -222,6 +222,7 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst self._await_primary() self._await_secondaries() self._await_stable_checkpoint() + self._setup_sessions_collection() def _await_primary(self): # Wait for the primary to be elected. @@ -308,6 +309,11 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst break time.sleep(0.1) # Wait a little bit before trying again. + def _setup_sessions_collection(self): + """Set up the sessions collection so that it will not attempt to set up during a test.""" + primary = self.nodes[0] + primary.mongo_client().admin.command({"refreshLogicalSessionCacheNow": 1}) + def _do_teardown(self): self.logger.info("Stopping all members of the replica set...") |