[merge] change tests to use reduceLockdirTimeout rather than reimplementing it

Jonathan Lange jml at mumak.net
Mon Mar 17 23:52:47 GMT 2008

On Tue, Mar 18, 2008 at 10:46 AM, Martin Pool <mbp at canonical.com> wrote:
> On 17/03/2008, Martin Pool <mbp at canonical.com> wrote:
>  > jml and I are working on <https://launchpad.net/bugs/172392>, and
>  >  noticed that some tests hardcode something close to what
>  >  reduceLockdirTimeout does, even though it's always set up by the
>  >  TestCaseWithMemoryTransport base class.
>  >
>  >  This actually gives it a 0 second timeout rather than 1 but I think
>  >  this is equivalent - it still tries the lock once.
>  Thanks for the reviews.
>  Although cleaning up the code is nice, I think what it now
>  consistently does is not quite right.  The thing is that tests now
>  cannot distinguish "lock immediately indicated contention" from "lock
>  would hang until it timed out".  We might want to assert that one or
>  the other happens.
>  So maybe we should add a distinct "timed out waiting for lock", and
>  allow that to be raised even if we only waited 0 seconds.

That sounds good to me.


More information about the bazaar mailing list