From 05c6bba656ea545de7e693cbaa1b97e0ada89855 Mon Sep 17 00:00:00 2001 From: Will Korteland Date: Wed, 5 Oct 2022 22:11:23 +0000 Subject: Import wiredtiger: 28d772e6b8433274a5b2d506baca68a69b29a0bd from branch mongodb-master ref: 3eb558c3ab..28d772e6b8 for: 6.2.0-rc0 WT-9542 Return an error if cursor largest key is called on a bounded cursor (#8328) --- src/third_party/wiredtiger/test/suite/test_cursor_bound01.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/third_party/wiredtiger/test/suite') diff --git a/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py b/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py index d45ebe186f1..657a05f46e5 100644 --- a/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py +++ b/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py @@ -110,5 +110,11 @@ class test_cursor_bound01(bound_base): cursor.bound("action=clear,bound=lower") cursor.bound("action=clear,bound=upper") + # Check that largest key doesn't work with bounded cursors. + cursor.set_key(self.gen_key(1)) + cursor.bound("bound=lower") + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.largest_key(), + '/Invalid argument/') + if __name__ == '__main__': wttest.run() -- cgit v1.2.1