~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-12 23:48:49 UTC
  • mfrom: (1704.2.13 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060512234849-259ff209fff58489
(mbp) various fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
            self.assertRaises(LockContention, lf2.wait_lock,
163
163
                              timeout=0.4, poll=0.1)
164
164
            after = time.time()
165
 
            self.assertTrue(after - before <= 1.0)
 
165
            # it should only take about 0.4 seconds, but we allow more time in
 
166
            # case the machine is heavily loaded
 
167
            self.assertTrue(after - before <= 8.0, 
 
168
                    "took %f seconds to detect lock contention" % (after - before))
166
169
        finally:
167
170
            lf1.unlock()
168
171