diff options
author | Luke Chen <luke.chen@mongodb.com> | 2021-08-11 14:29:27 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-11 04:42:04 +0000 |
commit | 08bd2e4a83e711cba3938684a32c3544b56a61dd (patch) | |
tree | 4e6802a3105d03dd794ebe22b2b76ec8cb553ed0 /src/third_party/wiredtiger/test/suite/test_assert01.py | |
parent | 7c6b85895f41c914873198fbc0510fe44eea3ae7 (diff) | |
download | mongo-08bd2e4a83e711cba3938684a32c3544b56a61dd.tar.gz |
Import wiredtiger: 03eb45ea7fd94d6f241f8668a58d0119c39bbf52 from branch mongodb-4.4
ref: 2b73914cd8..03eb45ea7f
for: 4.4.9
WT-6755 Documentation: populate developer glossary
WT-6902 Metadata subpage for Architecture Guide
WT-6905 Write row-store and column-store subpage for Architecture Guide
WT-6910 Write "history store" subpage for Architecture Guide
WT-6914 Write "database files" 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-7607 Add the possibility to use an existing database for many-coll-test
WT-7673 Investigate and fix manydbs test failure on Windows
WT-7703 Fix timeout in test_checkpoint_snapshot04
WT-7732 Add a timeout configuration for flush_tier
WT-7758 Force evict a page when the update chain is too long
WT-7787 Don't read pages for checkpoint cleanup when the cache is in aggressive mode
WT-7789 Change tiered python tests to fail without extension library
WT-7817 Make tiered storage address cookies backward compatible
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-7864 Add support to run.py for running lists/ranges of scenarios in a test
WT-7865 Disable timeout assert while waiting for eviction to quiesce prior to RTS and test
WT-7870 Fix measurement of cyclomatic code complexity
WT-7871 Remove comment that is no longer true
WT-7874 Remove two other stale comments
WT-7876 Update rollback to stable test to use correct boolean values and update statistic checking logic
WT-7882 Fix discrepancy for wiredtiger.in on mongodb-4.4 branch
WT-7883 Remove incorrect wt_free statement
WT-7889 Find/replace existing uses of WT with WiredTiger in reference guide
WT-7890 Fix CMake syntax error in config_lib
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_assert01.py')
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_assert01.py | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_assert01.py b/src/third_party/wiredtiger/test/suite/test_assert01.py index a91fd1700e0..4793ef26e72 100644 --- a/src/third_party/wiredtiger/test/suite/test_assert01.py +++ b/src/third_party/wiredtiger/test/suite/test_assert01.py @@ -32,9 +32,7 @@ from suite_subprocess import suite_subprocess import wiredtiger, wttest - -def timestamp_str(t): - return '%x' % t +from wtscenario import make_scenarios class test_assert01(wttest.WiredTigerTestCase, suite_subprocess): base = 'assert01' @@ -43,13 +41,18 @@ class test_assert01(wttest.WiredTigerTestCase, suite_subprocess): uri_def = base_uri + '.def.wt' uri_never = base_uri + '.never.wt' uri_none = base_uri + '.none.wt' - cfg = 'key_format=S,value_format=S,' cfg_always = 'verbose=[write_timestamp],write_timestamp_usage=always,assert=(write_timestamp=on)' cfg_def = '' cfg_never = 'verbose=(write_timestamp=true),write_timestamp_usage=never,assert=(write_timestamp=on)' cfg_none = 'assert=(write_timestamp=off)' session_config = 'isolation=snapshot' + key_format_values = [ + ('column', dict(key_format='r', usestrings=False)), + ('string-row', dict(key_format='S', usestrings=True)) + ] + scenarios = make_scenarios(key_format_values) + count = 1 # # Commit a k/v pair making sure that it detects an error if needed, when @@ -57,13 +60,13 @@ class test_assert01(wttest.WiredTigerTestCase, suite_subprocess): # def insert_check(self, uri, use_ts): c = self.session.open_cursor(uri) - key = 'key' + str(self.count) + key = 'key' + str(self.count) if self.usestrings else self.count val = 'value' + str(self.count) # Commit with a timestamp self.session.begin_transaction() self.session.timestamp_transaction( - 'commit_timestamp=' + timestamp_str(self.count)) + 'commit_timestamp=' + self.timestamp_str(self.count)) c[key] = val # All settings other than never should commit successfully if (use_ts != 'never'): @@ -77,7 +80,7 @@ class test_assert01(wttest.WiredTigerTestCase, suite_subprocess): self.count += 1 # Commit without a timestamp - key = 'key' + str(self.count) + key = 'key' + str(self.count) if self.usestrings else self.count val = 'value' + str(self.count) c = self.session.open_cursor(uri) self.session.begin_transaction() @@ -94,11 +97,13 @@ class test_assert01(wttest.WiredTigerTestCase, suite_subprocess): c.close() def test_commit_timestamp(self): + cfg = 'key_format={},value_format=S,'.format(self.key_format) + # Create a data item at a timestamp - self.session.create(self.uri_always, self.cfg + self.cfg_always) - self.session.create(self.uri_def, self.cfg + self.cfg_def) - self.session.create(self.uri_never, self.cfg + self.cfg_never) - self.session.create(self.uri_none, self.cfg + self.cfg_none) + self.session.create(self.uri_always, cfg + self.cfg_always) + self.session.create(self.uri_def, cfg + self.cfg_def) + self.session.create(self.uri_never, cfg + self.cfg_never) + self.session.create(self.uri_none, cfg + self.cfg_none) # Check inserting into each table self.insert_check(self.uri_always, 'always') |