diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-04-04 13:29:28 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-04 03:56:21 +0000 |
commit | 09654db603334e7fe422c702f05c7675d00870aa (patch) | |
tree | 95be26893333e6b32cc4650fadbae5e235e83bb4 | |
parent | b0ffe36c691a83dee1587c248148231b5d9f62c1 (diff) | |
download | mongo-09654db603334e7fe422c702f05c7675d00870aa.tar.gz |
Import wiredtiger: 024e03702869d87286c1698a3c3b28378d00d18b from branch mongodb-master
ref: 930ccee6ff..024e037028
for: 6.0.0-rc0
WT-8988 Extend test_excl.py to cover more test cases and add tiered storage
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_excl.py | 39 |
2 files changed, 29 insertions, 12 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index ea87ab9a76b..aa23cc31006 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "930ccee6ffc8f9f1f2ff77e74d1b47be150c2409" + "commit": "024e03702869d87286c1698a3c3b28378d00d18b" } diff --git a/src/third_party/wiredtiger/test/suite/test_excl.py b/src/third_party/wiredtiger/test/suite/test_excl.py index 9e656955026..73f7a9472b2 100644 --- a/src/third_party/wiredtiger/test/suite/test_excl.py +++ b/src/third_party/wiredtiger/test/suite/test_excl.py @@ -26,23 +26,40 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. +from helper_tiered import TieredConfigMixin, tiered_storage_sources import wiredtiger, wttest from wtscenario import make_scenarios # Test session.create with the exclusive configuration. -class test_create_excl(wttest.WiredTigerTestCase): - scenarios = make_scenarios([ - ('file', dict(type='file:')), - ('table', dict(type='table:')) - ]) - - # Create the object with "exclusive", then assert that creation with - # "exclusive" fails. +class test_create_excl(TieredConfigMixin, wttest.WiredTigerTestCase): + types = [ + ('file', dict(type = 'file:')), + ('table', dict(type = 'table:')), + ] + + scenarios = make_scenarios(tiered_storage_sources, types) + def test_create_excl(self): - uri = self.type + 'create_excl' - self.session.create(uri, "exclusive") + if self.is_tiered_scenario() and self.type == 'file:': + self.skipTest('Tiered storage does not support file URIs.') + + uri = self.type + "create_excl" + + # Create the object with the exclusive setting. + self.session.create(uri, "exclusive=true") + + # Exclusive re-create should error. self.assertRaises(wiredtiger.WiredTigerError, - lambda: self.session.create(uri, "exclusive")) + lambda: self.session.create(uri, "exclusive=true")) + + # Non-exclusive re-create is allowed. + self.session.create(uri, "exclusive=false") + + # Exclusive create on a table that does not exist should succeed. + self.session.create(uri + "_non_existent", "exclusive=true") + + # Non-exclusive create is allowed. + self.session.create(uri + "_non_existent1", "exclusive=false") if __name__ == '__main__': wttest.run() |