summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-08-08 11:26:18 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-08-08 11:26:18 +1000
commit5379b060be808b8dcf9e42dc59088c387d5c6075 (patch)
tree90466c4f484977e00424c65deede15a549a412c4 /test
parent61eed13c2669b6cd524da897e53381155bafb2ed (diff)
downloadmongo-5379b060be808b8dcf9e42dc59088c387d5c6075.tar.gz
Add a test for `session_max` settings, make sure we add enough to account for at least the default internal sessions.
Diffstat (limited to 'test')
-rw-r--r--test/suite/test_config05.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/suite/test_config05.py b/test/suite/test_config05.py
index d6ab5607686..04ded94d477 100644
--- a/test/suite/test_config05.py
+++ b/test/suite/test_config05.py
@@ -81,6 +81,18 @@ class test_config05(wttest.WiredTigerTestCase):
self.populate(self.session)
self.verify_entries(self.session)
+ def test_one_session(self):
+ self.conn = wiredtiger.wiredtiger_open('.', 'create,session_max=1')
+ self.session = self.conn.open_session(None)
+ self.populate(self.session)
+ self.verify_entries(self.session)
+
+ def test_too_many_sessions(self):
+ self.conn = wiredtiger.wiredtiger_open('.', 'create,session_max=1')
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: [self.conn.open_session(None) for i in range(100)],
+ '/configured to support/')
+
def test_exclusive_create(self):
self.conn = wiredtiger.wiredtiger_open('.', 'create,exclusive')
self.conn.close()