sporadic test failure on hashcache length tests

John A Meinel john at arbash-meinel.com
Tue Aug 23 17:38:02 BST 2005


Robert Collins wrote:
> Sometimes (unreproducible :[) I get a test failure in testhashcache.py
> line 98.
>
> Cheers,
> Rob

Looking at the code, I would guess time.time() is returning a floating
point value, so you are only waiting 0.5 seconds, versus waiting 1 full
second so that the hashcache will do its job. (I believe the code
explicitly requires that 1s has passed from the stat before the contents
will be cached.)

Attached is a simple fix for this, which I think would solve the problem.

It probably will make the test suite take longer, but that should be
okay, as long as it gives the right answer *always*.

John
=:->

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testhashcache.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20050823/9f1b2d73/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050823/9f1b2d73/attachment.pgp 


More information about the bazaar mailing list