summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/suite/test_txn14.py
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-08-10 15:16:08 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-10 05:40:43 +0000
commit13397fb0bf9aa9aca4e8fe6b736cc458bba1d494 (patch)
treebd6cfb32acfd590821f7c7d38739ca454f0e6687 /src/third_party/wiredtiger/test/suite/test_txn14.py
parent2cc4cf27e7fa3fb7a158f05f8ae1b9beab742515 (diff)
downloadmongo-13397fb0bf9aa9aca4e8fe6b736cc458bba1d494.tar.gz
Import wiredtiger: ffebd365d6c3c18422437bcae51d8a26a17772a0 from branch mongodb-5.0
ref: 8b35a8d923..ffebd365d6 for: 5.0.3 WT-6755 Documentation: populate developer glossary WT-6905 Write row-store and column-store subpage for Architecture Guide WT-6910 Write "history store" subpage for Architecture Guide WT-7007 Backup architecture guide page WT-7198 Fix test_backup15 failure with backup mismatch WT-7352 Fix test_hs01 conflict between concurrent operations in cursor modify WT-7521 Remove excess ckplist invalidations WT-7592 Remove log_flush("sync=background") support WT-7599 Update the CONFIG file based on the release that is about to run for compatibility tests WT-7673 Investigate and fix manydbs test failure on Windows WT-7830 Migrate the python setup scripts to use cmake WT-7838 Ability for ordered timestamp assertion to do more than a log message WT-7842 Remove explicit ulimit -n call in many-collection-test WT-7860 Improve code coverage reporting WT-7876 Update rollback to stable test to use correct boolean values and update statistic checking logic WT-7893 Remove ignored message from wiredtiger_open in test_encrypt08 WT-7895 Fix arch-data-file.dox documentation build failure WT-7897 Enable verbose logging for test_backup15 to aid debugging WT-7898 Upload many-coll-test artifacts WT-7900 Fix insertion of new records in test format for column-store WT-7901 test suite cleanup WT-7908 Make variable-length column store work again with the static tests WT-7935 Add arm64 implementation of rdtsc equivalent instruction WT-7937 Fix s_docs to use sh, not bash syntax WT-7938 Fix rollback-to-stable memory leak on error
Diffstat (limited to 'src/third_party/wiredtiger/test/suite/test_txn14.py')
-rw-r--r--src/third_party/wiredtiger/test/suite/test_txn14.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_txn14.py b/src/third_party/wiredtiger/test/suite/test_txn14.py
index 24c51023cb4..f3eaac6cd6b 100644
--- a/src/third_party/wiredtiger/test/suite/test_txn14.py
+++ b/src/third_party/wiredtiger/test/suite/test_txn14.py
@@ -38,7 +38,6 @@ import wttest
class test_txn14(wttest.WiredTigerTestCase, suite_subprocess):
t1 = 'table:test_txn14_1'
- create_params = 'key_format=i,value_format=i'
entries = 10000
extra_entries = 5
conn_config = 'log=(archive=false,enabled,file_max=100K)'
@@ -46,9 +45,12 @@ class test_txn14(wttest.WiredTigerTestCase, suite_subprocess):
sync_list = [
('write', dict(sync='off')),
('sync', dict(sync='on')),
- ('bg', dict(sync='background')),
]
- scenarios = make_scenarios(sync_list)
+ key_format_values = [
+ ('integer-row', dict(key_format='i')),
+ ('column', dict(key_format='r')),
+ ]
+ scenarios = make_scenarios(sync_list, key_format_values)
def test_log_flush(self):
# Here's the strategy:
@@ -59,32 +61,27 @@ class test_txn14(wttest.WiredTigerTestCase, suite_subprocess):
# - Make recovery run.
# - Confirm flushed data is in the table.
#
- self.session.create(self.t1, self.create_params)
+ create_params = 'key_format={},value_format=i'.format(self.key_format)
+ self.session.create(self.t1, create_params)
c = self.session.open_cursor(self.t1, None, None)
- for i in range(self.entries):
+ for i in range(1, self.entries + 1):
c[i] = i + 1
cfgarg='sync=%s' % self.sync
self.pr('cfgarg ' + cfgarg)
self.session.log_flush(cfgarg)
- for i in range(self.extra_entries):
+ for i in range(1, self.extra_entries + 1):
c[i+self.entries] = i + self.entries + 1
c.close()
self.session.log_flush(cfgarg)
- if self.sync == 'background':
- # If doing a background flush, wait 30 seconds. I have seen an
- # individual log file's fsync take more than a second on some
- # systems, and we've seen timeouts at 10 seconds on systems
- # with slow I/O. So give it time to flush perhaps a few files.
- self.session.transaction_sync('timeout_ms=30000')
simulate_crash_restart(self, ".", "RESTART")
c = self.session.open_cursor(self.t1, None, None)
- i = 0
+ i = 1
for key, value in c:
self.assertEqual(i, key)
self.assertEqual(i+1, value)
i += 1
all = self.entries + self.extra_entries
- self.assertEqual(i, all)
+ self.assertEqual(i, all + 1)
c.close()
if __name__ == '__main__':