diff options
Diffstat (limited to 'src/third_party/wiredtiger/test/suite/test_txn15.py')
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_txn15.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_txn15.py b/src/third_party/wiredtiger/test/suite/test_txn15.py index a266bf37582..c5663bf70a4 100644 --- a/src/third_party/wiredtiger/test/suite/test_txn15.py +++ b/src/third_party/wiredtiger/test/suite/test_txn15.py @@ -47,9 +47,10 @@ class test_txn15(wttest.WiredTigerTestCase, suite_subprocess): 'transaction_sync=(enabled=%s),' % self.conn_enable + \ 'transaction_sync=(method=%s),' % self.conn_method - key_format_values = [ - ('integer-row', dict(key_format='i')), - ('column', dict(key_format='r')), + format_values = [ + ('integer-row', dict(key_format='i', value_format='i')), + ('column', dict(key_format='r', value_format='i')), + ('column-fix', dict(key_format='r', value_format='8t')), ] conn_sync_enabled = [ ('en_off', dict(conn_enable='false')), @@ -74,9 +75,14 @@ class test_txn15(wttest.WiredTigerTestCase, suite_subprocess): ('c_none', dict(commit_sync=None)), ('c_off', dict(commit_sync='sync=off')), ] - scenarios = make_scenarios(key_format_values, conn_sync_enabled, conn_sync_method, + scenarios = make_scenarios(format_values, conn_sync_enabled, conn_sync_method, begin_sync, commit_sync) + def mkvalue(self, i): + if self.value_format == '8t': + return i % 256 + return i + # Given the different configuration settings determine if this group # of settings would result in either a wait for write or sync. # Returns None, "write" or "sync". None means no waiting for either. @@ -114,7 +120,7 @@ class test_txn15(wttest.WiredTigerTestCase, suite_subprocess): if self.begin_sync != None and self.commit_sync != None: return - create_params = 'key_format={},value_format=i'.format(self.key_format) + create_params = 'key_format={},value_format={}'.format(self.key_format, self.value_format) self.session.create(self.uri, create_params) stat_cursor = self.session.open_cursor('statistics:', None, None) @@ -131,7 +137,7 @@ class test_txn15(wttest.WiredTigerTestCase, suite_subprocess): c = self.session.open_cursor(self.uri, None, None) self.session.begin_transaction(self.begin_sync) for i in range(1, self.entries + 1): - c[i] = i + 1 + c[i] = self.mkvalue(i + 1) self.session.commit_transaction(self.commit_sync) c.close() |