summaryrefslogtreecommitdiff
path: root/test/suite
diff options
context:
space:
mode:
authorDon Anderson <dda@ddanderson.com>2016-01-01 11:20:29 -0500
committerDon Anderson <dda@ddanderson.com>2016-01-01 11:20:29 -0500
commitacd25d4e98b4acf511c8a91f8876b8c7a1b68c8d (patch)
tree14c7b9ec080156574f38e5857645de8ac1e4825d /test/suite
parentfa209c1357ba77e785578ccce7a0f6d1a8fefc2c (diff)
downloadmongo-acd25d4e98b4acf511c8a91f8876b8c7a1b68c8d.tar.gz
WT-2142. In test suite, replace lambda expressions by functions.
Diffstat (limited to 'test/suite')
-rw-r--r--test/suite/test_async01.py7
-rw-r--r--test/suite/test_async02.py7
-rw-r--r--test/suite/test_backup04.py5
-rw-r--r--test/suite/test_bug011.py5
-rw-r--r--test/suite/test_compress01.py5
-rw-r--r--test/suite/test_cursor07.py7
-rw-r--r--test/suite/test_cursor08.py11
-rw-r--r--test/suite/test_stat02.py4
-rw-r--r--test/suite/test_txn08.py7
-rw-r--r--test/suite/test_txn11.py5
-rw-r--r--test/suite/test_txn13.py7
-rw-r--r--test/suite/test_txn15.py5
12 files changed, 44 insertions, 31 deletions
diff --git a/test/suite/test_async01.py b/test/suite/test_async01.py
index 15e2fbf64ae..c30a79c73e9 100644
--- a/test/suite/test_async01.py
+++ b/test/suite/test_async01.py
@@ -132,9 +132,10 @@ class test_async01(wttest.WiredTigerTestCase, suite_subprocess):
('table-row', dict(tablekind='row',uri='table')),
])
- conn_config = lambda self, dir: \
- 'async=(enabled=true,ops_max=%s,' % self.async_ops + \
- 'threads=%s)' % self.async_threads
+ # Enable async for this test.
+ def conn_config(self, dir):
+ return 'async=(enabled=true,ops_max=%s,' % self.async_ops + \
+ 'threads=%s)' % self.async_threads
def genkey(self, i):
if self.tablekind == 'row':
diff --git a/test/suite/test_async02.py b/test/suite/test_async02.py
index 775adb239ef..f6070774130 100644
--- a/test/suite/test_async02.py
+++ b/test/suite/test_async02.py
@@ -129,9 +129,10 @@ class test_async02(wttest.WiredTigerTestCase, suite_subprocess):
('table-row', dict(tablekind='row',uri='table')),
])
- conn_config = lambda self, dir: \
- 'async=(enabled=true,ops_max=%s,' % self.async_ops + \
- 'threads=%s)' % self.async_threads
+ # Enable async for this test.
+ def conn_config(self, dir):
+ return 'async=(enabled=true,ops_max=%s,' % self.async_ops + \
+ 'threads=%s)' % self.async_threads
def genkey(self, i):
if self.tablekind == 'row':
diff --git a/test/suite/test_backup04.py b/test/suite/test_backup04.py
index 142b0d5faa6..406fb209cab 100644
--- a/test/suite/test_backup04.py
+++ b/test/suite/test_backup04.py
@@ -57,9 +57,10 @@ class test_backup_target(wttest.WiredTigerTestCase, suite_subprocess):
scenarios = check_scenarios([
('table', dict(uri='table:test',dsize=100,nops=2000,nthreads=1,time=30)),
])
+
# Create a large cache, otherwise this test runs quite slowly.
- conn_config = lambda self, dir: \
- 'cache_size=1G,log=(archive=false,enabled,file_max=%s)' % \
+ def conn_config(self, dir):
+ return 'cache_size=1G,log=(archive=false,enabled,file_max=%s)' % \
self.logmax
def populate(self, uri, dsize, rows):
diff --git a/test/suite/test_bug011.py b/test/suite/test_bug011.py
index d412c1c0d01..b2203e38a38 100644
--- a/test/suite/test_bug011.py
+++ b/test/suite/test_bug011.py
@@ -40,8 +40,9 @@ class test_bug011(wttest.WiredTigerTestCase):
ntables = 50
nrows = 10000
nops = 10000
- conn_config = lambda self, dir: \
- 'cache_size=10MB,hazard_max=' + str(self.ntables / 2)
+ # Add connection configuration for this test.
+ def conn_config(self, dir):
+ return 'cache_size=10MB,hazard_max=' + str(self.ntables / 2)
def test_eviction(self):
cursors = []
diff --git a/test/suite/test_compress01.py b/test/suite/test_compress01.py
index a9b97143b0c..e2d7f5ed689 100644
--- a/test/suite/test_compress01.py
+++ b/test/suite/test_compress01.py
@@ -52,8 +52,9 @@ class test_compress01(wttest.WiredTigerTestCase):
nrecords = 10000
bigvalue = "abcdefghij" * 1000
- conn_config = lambda self, dir: \
- self.extensionArg(self.compress)
+ # Load the compression extension, compression is enabled elsewhere.
+ def conn_config(self, dir):
+ return self.extensionArg(self.compress)
# Return the wiredtiger_open extension argument for a shared library.
def extensionArg(self, name):
diff --git a/test/suite/test_cursor07.py b/test/suite/test_cursor07.py
index 6de4c1686e0..ea36df2347f 100644
--- a/test/suite/test_cursor07.py
+++ b/test/suite/test_cursor07.py
@@ -48,9 +48,10 @@ class test_cursor07(wttest.WiredTigerTestCase, suite_subprocess):
('regular', dict(reopen=False)),
('reopen', dict(reopen=True))
])
- conn_config = lambda self, dir: \
- 'log=(archive=false,enabled,file_max=%s),' % self.logmax + \
- 'transaction_sync="(method=dsync,enabled)"'
+ # Enable logging for this test.
+ def conn_config(self, dir):
+ return 'log=(archive=false,enabled,file_max=%s),' % self.logmax + \
+ 'transaction_sync="(method=dsync,enabled)"'
def test_log_cursor(self):
# print "Creating %s with config '%s'" % (self.uri, self.create_params)
diff --git a/test/suite/test_cursor08.py b/test/suite/test_cursor08.py
index f7e8534fb88..3edb1b27d08 100644
--- a/test/suite/test_cursor08.py
+++ b/test/suite/test_cursor08.py
@@ -54,11 +54,12 @@ class test_cursor08(wttest.WiredTigerTestCase, suite_subprocess):
('none', dict(compress='none')),
])
scenarios = number_scenarios(multiply_scenarios('.', reopens, compress))
- conn_config = lambda self, dir: \
- 'log=(archive=false,enabled,file_max=%s,' % self.logmax + \
- 'compressor=%s),' % self.compress + \
- 'transaction_sync="(method=dsync,enabled)",' + \
- self.extensionArg(self.compress)
+ # Load the compression extension, and enable it for logging.
+ def conn_config(self, dir):
+ return 'log=(archive=false,enabled,file_max=%s,' % self.logmax + \
+ 'compressor=%s),' % self.compress + \
+ 'transaction_sync="(method=dsync,enabled)",' + \
+ self.extensionArg(self.compress)
# Return the wiredtiger_open extension argument for a shared library.
def extensionArg(self, name):
diff --git a/test/suite/test_stat02.py b/test/suite/test_stat02.py
index 1d869d20326..cd6cc8f11d3 100644
--- a/test/suite/test_stat02.py
+++ b/test/suite/test_stat02.py
@@ -60,7 +60,9 @@ class test_stat_cursor_config(wttest.WiredTigerTestCase):
scenarios = number_scenarios(
multiply_scenarios('.', uri, data_config, cursor_config))
- conn_config = lambda self, dir: 'statistics=(%s)' % self.data_config
+ # Turn on statistics for this test.
+ def conn_config(self, dir):
+ return 'statistics=(%s)' % self.data_config
# For each database/cursor configuration, confirm the right combinations
# succeed or fail.
diff --git a/test/suite/test_txn08.py b/test/suite/test_txn08.py
index 218e80c0379..200df400e50 100644
--- a/test/suite/test_txn08.py
+++ b/test/suite/test_txn08.py
@@ -41,9 +41,10 @@ class test_txn08(wttest.WiredTigerTestCase, suite_subprocess):
tablename = 'test_txn08'
uri = 'table:' + tablename
- conn_config = lambda self, dir: \
- 'log=(archive=false,enabled,file_max=%s),' % self.logmax + \
- 'transaction_sync="(method=dsync,enabled)"'
+ # Turn on logging for this test.
+ def conn_config(self, dir):
+ return 'log=(archive=false,enabled,file_max=%s),' % self.logmax + \
+ 'transaction_sync="(method=dsync,enabled)"'
def test_printlog_unicode(self):
# print "Creating %s with config '%s'" % (self.uri, self.create_params)
diff --git a/test/suite/test_txn11.py b/test/suite/test_txn11.py
index b8da7859306..a2d995b48ea 100644
--- a/test/suite/test_txn11.py
+++ b/test/suite/test_txn11.py
@@ -43,8 +43,9 @@ class test_txn11(wttest.WiredTigerTestCase, suite_subprocess):
source_uri = 'table:' + tablename + "_src"
uri = 'table:' + tablename
- conn_config = lambda self, dir: \
- 'log=(archive=%s,' % self.archive + \
+ # Turn on logging for this test.
+ def conn_config(self, dir):
+ return 'log=(archive=%s,' % self.archive + \
'enabled,file_max=%s,prealloc=false),' % self.logmax + \
'transaction_sync=(enabled=false),'
diff --git a/test/suite/test_txn13.py b/test/suite/test_txn13.py
index 060ba17b212..12a06d0b44a 100644
--- a/test/suite/test_txn13.py
+++ b/test/suite/test_txn13.py
@@ -49,9 +49,10 @@ class test_txn13(wttest.WiredTigerTestCase, suite_subprocess):
('4gb', dict(expect_err=True, valuesize=4194304))
])
- conn_config = lambda self, dir: \
- 'log=(archive=false,enabled,file_max=%s)' % self.logmax + \
- ',cache_size=8G'
+ # Turn on logging for this test.
+ def conn_config(self, dir):
+ return 'log=(archive=false,enabled,file_max=%s)' % self.logmax + \
+ ',cache_size=8G'
@wttest.longtest('txn tests with huge values')
def test_large_values(self):
diff --git a/test/suite/test_txn15.py b/test/suite/test_txn15.py
index 9e9906a5fe5..e6f3d320c03 100644
--- a/test/suite/test_txn15.py
+++ b/test/suite/test_txn15.py
@@ -40,8 +40,9 @@ class test_txn15(wttest.WiredTigerTestCase, suite_subprocess):
uri = 'table:test_txn15_1'
create_params = 'key_format=i,value_format=i'
entries = 100
- conn_config = lambda self, dir: \
- 'statistics=(fast),' + \
+ # Turn on logging for this test.
+ def conn_config(self, dir):
+ return 'statistics=(fast),' + \
'log=(archive=false,enabled,file_max=100K),' + \
'use_environment=false,' + \
'transaction_sync=(enabled=%s),' % self.conn_enable + \