From: robk-tahoe Date: Tue, 8 Apr 2008 18:06:58 +0000 (-0700) Subject: key_generator: remove poll timeouts from test X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/provisioning?a=commitdiff_plain;h=27ac71458fd9ebff137bcddf1227b67f03a6f79e;p=tahoe-lafs%2Ftahoe-lafs.git key_generator: remove poll timeouts from test the timeouts on uses of 'poll' were there purely to make sure a test doesn't poll indefinitely. however having such timeouts makes tests susceptible to premature timeouts under high load, or on slow machines. (e.g. cygwin slaves running in virtual machines on loaded hosts) purportedly trial by default applies a timeout to tests to prevent them hanging out indefinitely, so these poll timeouts are redundant and cause intermittent failures on slow hosts. hence they're more bother than they're worth, and should be culled. --- diff --git a/src/allmydata/test/test_keygen.py b/src/allmydata/test/test_keygen.py index 81d6df7e..38c54d3f 100644 --- a/src/allmydata/test/test_keygen.py +++ b/src/allmydata/test/test_keygen.py @@ -51,7 +51,7 @@ class KeyGenService(unittest.TestCase, testutil.PollMixin): # first wait for key gen pool to fill up d = eventual.fireEventually() d.addCallback(p, 'waiting for pool to fill up') - d.addCallback(lambda junk: self.poll(keypool_full, timeout=60)) + d.addCallback(lambda junk: self.poll(keypool_full)) d.addCallback(p, 'grabbing a few keys') # grab a few keys, check that pool size shrinks @@ -92,7 +92,6 @@ class KeyGenService(unittest.TestCase, testutil.PollMixin): d.addCallback(p, 'checking pool replenishment') # check that the pool will refill - timeout = 4*kgs.key_generator.pool_size + kgs.key_generator.pool_refresh_delay - d.addCallback(lambda junk: self.poll(keypool_full, timeout=timeout)) + d.addCallback(lambda junk: self.poll(keypool_full)) return d