summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/suite/test_hs09.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/test/suite/test_hs09.py')
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs09.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_hs09.py b/src/third_party/wiredtiger/test/suite/test_hs09.py
index 82681e286cc..6175fbbfed9 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs09.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs09.py
@@ -61,12 +61,17 @@ class test_hs09(wttest.WiredTigerTestCase):
# Check the data file value.
cursor = session.open_cursor(self.uri, None, 'checkpoint=WiredTigerCheckpoint')
- # We no longer need to do anything special if we are expecting prepared updates
- # in the datastore, because checkpoint cursors always set ignore_prepare.
+ # If we are expecting prepapred updates in the datastore, start an explicit transaction with
+ # ignore prepare flag to avoid getting a WT_PREPARE_CONFLICT error.
+ if expect_prepared_in_datastore:
+ session.begin_transaction("ignore_prepare=true")
for _, value in cursor:
self.assertEqual(value, expected_data_value)
+ if expect_prepared_in_datastore:
+ session.rollback_transaction()
+
cursor.close()
# Check the history store file value.
cursor = session.open_cursor("file:WiredTigerHS.wt", None, 'checkpoint=WiredTigerCheckpoint')