]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_crawler: don't require >=1 cycle on cygwin
authorBrian Warner <warner@lothar.com>
Thu, 19 Feb 2009 07:58:18 +0000 (00:58 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 19 Feb 2009 07:58:18 +0000 (00:58 -0700)
src/allmydata/test/test_crawler.py

index b9e737b164e24b476b3b3d288f432dc5b75f4ed0..a0a21cbb5a6f9a8392392eedf03aeb4e7a2cc825 100644 (file)
@@ -291,8 +291,10 @@ class Basic(unittest.TestCase, StallMixin, pollmixin.PollMixin):
         # On windows I'll extend the allowable range.
 
         min_ok = 20
+        min_cycles = 1
         if "cygwin" in sys.platform.lower() or "win32" in sys.platform.lower():
             min_ok = 3
+            min_cycles = 0
 
         start = time.time()
         d = self.stall(delay=4.0)
@@ -300,7 +302,7 @@ class Basic(unittest.TestCase, StallMixin, pollmixin.PollMixin):
             elapsed = time.time() - start
             percent = 100.0 * c.accumulated / elapsed
             self.failUnless(min_ok < percent < 70, "crawler got %d%%" % percent)
-            self.failUnless(c.cycles >= 1, c.cycles)
+            self.failUnless(c.cycles >= min_cycles, c.cycles)
         d.addCallback(_done)
         return d