summaryrefslogtreecommitdiff
path: root/test/suite/test_sweep01.py
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-04-08 15:37:34 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-04-08 15:37:34 -0400
commit1b2d14a514c048b9aaae6906c8ea740a05e09f85 (patch)
treea8461475d81ae7494667bc74a1fa00b6e599192e /test/suite/test_sweep01.py
parentfac74b4665d6dfa3aebecf741c914fd1678fa628 (diff)
downloadmongo-1b2d14a514c048b9aaae6906c8ea740a05e09f85.tar.gz
Make this test run again: set the file_manager.close_handle_minimum to
0 so we sweep no matter how many handles are open. Now we maintain a count of open files regardless of how statistics are configured, we have 3 open files when we finish sweeping, previously we weren't counting the WiredTiger lock file.
Diffstat (limited to 'test/suite/test_sweep01.py')
-rw-r--r--test/suite/test_sweep01.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/suite/test_sweep01.py b/test/suite/test_sweep01.py
index b0a9adcf44e..f5e2aa96cbe 100644
--- a/test/suite/test_sweep01.py
+++ b/test/suite/test_sweep01.py
@@ -63,7 +63,8 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
# That matches the ratio of the default 10 and 30 seconds.
conn_params = \
',create,error_prefix="%s: ",' % self.shortid() + \
- 'file_manager=(close_idle_time=6,close_scan_interval=2),' + \
+ 'file_manager=(close_handle_minimum=0,' + \
+ 'close_idle_time=6,close_scan_interval=2),' + \
'checkpoint=(wait=%d),' % self.ckpt + \
'statistics=(fast),'
# print "Creating conn at '%s' with config '%s'" % (dir, conn_params)
@@ -76,7 +77,6 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
return conn
def test_ops(self):
-
#
# Set up numfiles with numkv entries. We just want some data in there
# we don't care what it is.
@@ -174,8 +174,9 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
print "ref1: " + str(ref1) + " ref2: " + str(ref2)
print "XX: nfile1: " + str(nfile1) + " nfile2: " + str(nfile2)
self.assertEqual(nfile2 < nfile1, True)
- # The only files that should be left is the metadata and the active one.
- if (nfile2 != 2):
+ # The only files that should be left is the metadata, the lock file
+ # and the active file.
+ if (nfile2 != 3):
print "close1: " + str(close1) + " close2: " + str(close2)
print "sweep1: " + str(sweep1) + " sweep2: " + str(sweep2)
print "sclose1: " + str(sclose1) + " sclose2: " + str(sclose2)
@@ -183,7 +184,7 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
print "tod1: " + str(tod1) + " tod2: " + str(tod2)
print "ref1: " + str(ref1) + " ref2: " + str(ref2)
print "XX2: nfile1: " + str(nfile1) + " nfile2: " + str(nfile2)
- self.assertEqual(nfile2 == 2, True)
+ self.assertEqual(nfile2 == 3, True)
if __name__ == '__main__':
wttest.run()