summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2015-03-26 16:55:22 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2015-03-26 16:55:22 +1100
commit17db2e09c257d4e45f82e77eee894ed536262177 (patch)
tree874d5b4bebff782cbb7e1ea3a41d49c0e7f3523f
parent67b71e1eaad1a5825f99a415d9851976f11dbfee (diff)
downloadmongo-17db2e09c257d4e45f82e77eee894ed536262177.tar.gz
The sweep test depends on checkpoints running to find clean handles to discard. Change checkpoint timing so sweep will find clean files unless checkpoint is unbelievably slow.
-rw-r--r--test/suite/test_sweep01.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/suite/test_sweep01.py b/test/suite/test_sweep01.py
index 989ffb7a971..8b5e0c74660 100644
--- a/test/suite/test_sweep01.py
+++ b/test/suite/test_sweep01.py
@@ -42,7 +42,7 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
uri = 'table:' + tablebase
numfiles = 50
numkv = 1000
- ckpt=10
+ ckpt = 5
types = [
('row', dict(tabletype='row',
@@ -103,12 +103,16 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
ref1 = stat_cursor[stat.conn.dh_conn_ref][2]
nfile1 = stat_cursor[stat.conn.file_open][2]
stat_cursor.close()
- # Inactive time on a handle must be a minute or more.
- # We've configured the sweep server to run every 2 seconds and idle
- # time to be 6 seconds. It should take at most 8 seconds for a handle
- # to be closed. Sleep for 12 seconds to be safe.
+
+ #
+ # We've configured checkpoints to run every 5 seconds, sweep server to
+ # run every 2 seconds and idle time to be 6 seconds. It should take
+ # about 8 seconds for a handle to be closed. Sleep for 12 seconds to be
+ # safe.
+ #
uri = '%s.test' % self.uri
self.session.create(uri, self.create_params)
+
#
# Keep inserting data to keep at least one handle active and give
# checkpoint something to do. Make sure checkpoint doesn't adjust
@@ -116,7 +120,7 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
#
c = self.session.open_cursor(uri, None)
k = 0
- sleep=0
+ sleep = 0
while sleep < 12:
k = k+1
c.set_key(k)