summaryrefslogtreecommitdiff
path: root/test/suite/test_txn05.py
diff options
context:
space:
mode:
authorDon Anderson <dda@ddanderson.com>2014-12-09 19:11:52 -0500
committerDon Anderson <dda@ddanderson.com>2014-12-09 19:11:52 -0500
commitcbe9e9bdbc508f95076b8097d41bb4cc799eab1c (patch)
treef7ff76c6544381be269e89a57596a5f7f4843050 /test/suite/test_txn05.py
parentb1a86d93d30233a090b7c86887962f319dd855f5 (diff)
downloadmongo-cbe9e9bdbc508f95076b8097d41bb4cc799eab1c.tar.gz
Change timing to allow archive thread to complete on tests that
do archive. Since this can make each test run substantially longer, reduce the number of tests that are doing archive from ~4000 to something under 100. Refs #1452.
Diffstat (limited to 'test/suite/test_txn05.py')
-rw-r--r--test/suite/test_txn05.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/suite/test_txn05.py b/test/suite/test_txn05.py
index 738e3eb9e7a..cc5db523c27 100644
--- a/test/suite/test_txn05.py
+++ b/test/suite/test_txn05.py
@@ -141,10 +141,9 @@ class test_txn05(wttest.WiredTigerTestCase, suite_subprocess):
try:
self.check(backup_conn.open_session(), None, committed)
finally:
- # Let other threads like archive run before closing.
- # time.sleep(0) is not guaranteed to force a context switch.
- # Use a small timeout.
- time.sleep(0.01)
+ # Sleep long enough so that the archive thread is guaranteed
+ # to run before we close the connection.
+ time.sleep(1.0)
backup_conn.close()
count += 1
#
@@ -234,7 +233,8 @@ class test_txn05(wttest.WiredTigerTestCase, suite_subprocess):
# Check the log state after the entire op completes
# and run recovery.
- self.check_log(committed)
+ if self.scenario_number % (len(test_txn05.scenarios) / 100 + 1) == 0:
+ self.check_log(committed)
if __name__ == '__main__':
wttest.run()