summaryrefslogtreecommitdiff
path: root/test/suite/test_sweep01.py
diff options
context:
space:
mode:
authorSusan LoVerso <sue@mongodb.com>2016-03-15 15:17:13 -0400
committerSusan LoVerso <sue@mongodb.com>2016-03-15 15:17:13 -0400
commit4077c50345f35ab2b921a1ad528926412e698409 (patch)
treed073ee4940c9f2441ebabd7626f999038a6de3f5 /test/suite/test_sweep01.py
parent1c964e8c0558e0bcc609f724fc39215deac6553c (diff)
downloadmongo-4077c50345f35ab2b921a1ad528926412e698409.tar.gz
WT-2461 Fix sweep loop to look for progress. Reduce number of tables.
Diffstat (limited to 'test/suite/test_sweep01.py')
-rw-r--r--test/suite/test_sweep01.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/suite/test_sweep01.py b/test/suite/test_sweep01.py
index 5c279c8f074..33d4f2398db 100644
--- a/test/suite/test_sweep01.py
+++ b/test/suite/test_sweep01.py
@@ -40,7 +40,7 @@ import wttest
class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
tablebase = 'test_sweep01'
uri = 'table:' + tablebase
- numfiles = 50
+ numfiles = 30
numkv = 1000
conn_config = 'file_manager=(close_handle_minimum=0,' + \
'close_idle_time=6,close_scan_interval=2),' + \
@@ -105,13 +105,27 @@ class test_sweep01(wttest.WiredTigerTestCase, suite_subprocess):
c = self.session.open_cursor(uri, None)
k = 0
sleep = 0
- while sleep < 16:
+ max = 60
+ last_nfile = nfile1
+ while sleep < max:
self.session.checkpoint()
k = k+1
c[k] = 1
sleep += 2
time.sleep(2)
+ # Give slow machines time to process files. As long as progress
+ # is made, keep going.
+ stat_cursor = self.session.open_cursor('statistics:', None, None)
+ this_nfile = stat_cursor[stat.conn.file_open][2]
+ stat_cursor.close()
+ self.pr("==== loop " + str(sleep))
+ self.pr("last_nfile " + str(last_nfile))
+ self.pr("this_nfile " + str(this_nfile))
+ if this_nfile == last_nfile and this_nfile < nfile1:
+ break
+ last_nfile = this_nfile
c.close()
+ self.pr("Sweep loop took " + str(sleep))
stat_cursor = self.session.open_cursor('statistics:', None, None)
close2 = stat_cursor[stat.conn.dh_sweep_close][2]