diff options
Diffstat (limited to 'src/third_party/wiredtiger/test/suite/test_prepare10.py')
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_prepare10.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare10.py b/src/third_party/wiredtiger/test/suite/test_prepare10.py index a9ae73848bd..8445406fc38 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare10.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare10.py @@ -31,9 +31,6 @@ from helper import copy_wiredtiger_home import wiredtiger, wttest from wtdataset import SimpleDataSet -def timestamp_str(t): - return '%x' % t - # test_prepare10.py # Test to ensure prepared tombstones are properly aborted even when they are written # to the data store. @@ -49,7 +46,7 @@ class test_prepare10(wttest.WiredTigerTestCase): cursor.set_key(ds.key(i)) cursor.set_value(value) self.assertEquals(cursor.insert(), 0) - self.session.commit_transaction('commit_timestamp=' + timestamp_str(ts)) + self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts)) cursor.close() def removes(self, ds, uri, nrows, ts): @@ -58,12 +55,12 @@ class test_prepare10(wttest.WiredTigerTestCase): for i in range(1, nrows): cursor.set_key(ds.key(i)) self.assertEquals(cursor.remove(), 0) - self.session.commit_transaction('commit_timestamp=' + timestamp_str(ts)) + self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts)) cursor.close() def check(self, ds, uri, nrows, value, ts): cursor = self.session.open_cursor(uri) - self.session.begin_transaction('ignore_prepare=true,read_timestamp=' + timestamp_str(ts)) + self.session.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(ts)) for i in range(1, nrows): cursor.set_key(ds.key(i)) self.assertEquals(cursor.search(), 0) @@ -73,7 +70,7 @@ class test_prepare10(wttest.WiredTigerTestCase): def check_not_found(self, ds, uri, nrows, ts): cursor = self.session.open_cursor(uri) - self.session.begin_transaction('ignore_prepare=true,read_timestamp=' + timestamp_str(ts)) + self.session.begin_transaction('ignore_prepare=true,read_timestamp=' + self.timestamp_str(ts)) for i in range(1, nrows): cursor.set_key(ds.key(i)) self.assertEquals(cursor.search(), wiredtiger.WT_NOTFOUND) @@ -92,8 +89,8 @@ class test_prepare10(wttest.WiredTigerTestCase): value_c = b"ccccc" * 100 # Commit some updates along with a prepared update, which is not resolved. - self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(10)) - self.conn.set_timestamp('stable_timestamp=' + timestamp_str(10)) + self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(10)) + self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(10)) # Initially load huge data self.updates(ds, uri, nrows, value_a, 20) @@ -141,7 +138,7 @@ class test_prepare10(wttest.WiredTigerTestCase): cursor_p.set_key(ds.key(i)) cursor_p.set_value(value_c) self.assertEquals(cursor_p.insert(), 0) - session_p.prepare_transaction('prepare_timestamp=' + timestamp_str(50)) + session_p.prepare_transaction('prepare_timestamp=' + self.timestamp_str(50)) self.check(ds, uri, nrows, value_a, 20) self.check(ds, uri, nrows, value_b, 35) |