summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/suite/test_util21.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/test/suite/test_util21.py')
-rw-r--r--src/third_party/wiredtiger/test/suite/test_util21.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_util21.py b/src/third_party/wiredtiger/test/suite/test_util21.py
index 2271ad8b312..6dc3e05e042 100644
--- a/src/third_party/wiredtiger/test/suite/test_util21.py
+++ b/src/third_party/wiredtiger/test/suite/test_util21.py
@@ -30,9 +30,6 @@ import wttest
from suite_subprocess import suite_subprocess
from helper import compare_files
-def timestamp_str(t):
- return '%x' % t
-
# test_util21.py
# Ensure that wt dump can dump obsolete data in the history store.
class test_util21(wttest.WiredTigerTestCase, suite_subprocess):
@@ -45,7 +42,7 @@ class test_util21(wttest.WiredTigerTestCase, suite_subprocess):
for i in range(1, 5):
self.session.begin_transaction()
cursor[str(i)] = value
- self.session.commit_transaction('commit_timestamp=' + timestamp_str(ts))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(ts))
cursor.close()
def test_dump_obsolete_data(self):
@@ -58,7 +55,7 @@ class test_util21(wttest.WiredTigerTestCase, suite_subprocess):
value3 = 'c' * 100
value4 = 'd' * 100
- self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(1))
+ self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1))
self.add_data_with_timestamp(uri, value1, 2)
self.add_data_with_timestamp(uri, value2, 3)
@@ -68,14 +65,14 @@ class test_util21(wttest.WiredTigerTestCase, suite_subprocess):
self.session.checkpoint()
# Set stable timestamp, so we don't lose data when closing/opening connection when using wt dump.
- self.conn.set_timestamp('stable_timestamp=' + timestamp_str(10))
+ self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(10))
# Call dump on the values before the oldest timestamp is set
self.runWt(['dump', 'file:WiredTigerHS.wt'], outfilename="before_oldest")
# Set oldest timestamp, and checkpoint, the obsolete data should not removed as
# the pages are clean.
- self.conn.set_timestamp('oldest_timestamp=' + timestamp_str(6))
+ self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(6))
self.session.checkpoint()
self.runWt(['dump', 'file:WiredTigerHS.wt'], outfilename="after_oldest")