summaryrefslogtreecommitdiff
path: root/test/suite/test_txn02.py
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-06-19 14:58:15 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-06-19 14:58:15 +1000
commitd8370be92991a3226fd5c587ea001ae168946658 (patch)
treee514c416ee798360e565c9a71d021b3cdc04975a /test/suite/test_txn02.py
parent34cc333bead69cb0746e004e6ab26f0d0f1f830e (diff)
downloadmongo-d8370be92991a3226fd5c587ea001ae168946658.tar.gz
Split the global transaction_sync configuration into two parts: a sync method (dsync, fsync or none), and a sync_on_commit flag (false by default). Convert the transaction-local configuration into a simple boolean "sync" using the configured method.
#1074
Diffstat (limited to 'test/suite/test_txn02.py')
-rw-r--r--test/suite/test_txn02.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/suite/test_txn02.py b/test/suite/test_txn02.py
index c194df07f32..e1ef37e606d 100644
--- a/test/suite/test_txn02.py
+++ b/test/suite/test_txn02.py
@@ -41,8 +41,9 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
uri = 'table:' + tablename
archive_list = ['true', 'false']
conn_list = ['reopen', 'stay_open']
- sync_list = ['dsync', 'fsync', 'none']
- txn_sync_list = ['', 'dsync', 'fsync', 'none']
+ sync_list = [
+ '(method=dsync,enabled)', '(method=fsync,enabled)', '(enabled=false)'
+ ]
types = [
('row', dict(tabletype='row',
@@ -200,11 +201,6 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
self.scenario_number % len(self.conn_list)]
ops = (self.op1, self.op2, self.op3, self.op4)
txns = (self.txn1, self.txn2, self.txn3, self.txn4)
- txn_sync = self.txn_sync_list[
- self.scenario_number % len(self.txn_sync_list)]
- txn_cfg = None
- if txn_sync != '':
- txn_cfg = 'transaction_sync="%s"' % txn_sync
# for ok, txn in zip(ops, txns):
# print ', '.join('%s(%d)[%s]' % (ok[0], ok[1], txn)
for i, ot in enumerate(zip(ops, txns)):
@@ -216,7 +212,8 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
self.reopen_conn()
c = self.session.open_cursor(self.uri, None, 'overwrite')
- self.session.begin_transaction(txn_cfg)
+ self.session.begin_transaction(
+ (self.scenario_number % 2) and 'sync' or None)
# Test multiple operations per transaction by always
# doing the same operation on key k + 1.
k1 = k + 1