diff options
Diffstat (limited to 'src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py')
| -rw-r--r-- | src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py b/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py index 7ee28a240cc..89a7faddfc0 100644 --- a/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py +++ b/src/third_party/wiredtiger/test/suite/test_checkpoint_snapshot02.py @@ -161,15 +161,8 @@ class test_checkpoint_snapshot02(wttest.WiredTigerTestCase): ckpt = checkpoint_thread(self.conn, done) try: ckpt.start() - - # Wait for checkpoint to start and acquire its snapshot before committing. - ckpt_snapshot = 0 - while not ckpt_snapshot: - time.sleep(1) - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_snapshot = stat_cursor[stat.conn.txn_checkpoint_snapshot_acquired][2] - stat_cursor.close() - + # Sleep for sometime so that checkpoint starts before committing last transaction. + time.sleep(2) session1.commit_transaction() finally: @@ -222,15 +215,8 @@ class test_checkpoint_snapshot02(wttest.WiredTigerTestCase): ckpt = checkpoint_thread(self.conn, done) try: ckpt.start() - - # Wait for checkpoint to start and acquire its snapshot before committing. - ckpt_snapshot = 0 - while not ckpt_snapshot: - time.sleep(1) - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_snapshot = stat_cursor[stat.conn.txn_checkpoint_snapshot_acquired][2] - stat_cursor.close() - + # Sleep for sometime so that checkpoint starts before committing last transaction. + time.sleep(2) session1.commit_transaction() finally: @@ -286,15 +272,8 @@ class test_checkpoint_snapshot02(wttest.WiredTigerTestCase): ckpt = checkpoint_thread(self.conn, done) try: ckpt.start() - - # Wait for checkpoint to start and acquire its snapshot before committing. - ckpt_snapshot = 0 - while not ckpt_snapshot: - time.sleep(1) - stat_cursor = self.session.open_cursor('statistics:', None, None) - ckpt_snapshot = stat_cursor[stat.conn.txn_checkpoint_snapshot_acquired][2] - stat_cursor.close() - + # Sleep for sometime so that checkpoint starts before committing last transaction. + time.sleep(2) session2.commit_transaction() finally: |
