[patch] hashcache fixes

Martin Pool mbp at canonical.com
Sun Jul 9 13:32:40 BST 2006


On  9 Jul 2006, Andrew Bennetts <andrew at canonical.com> wrote:
> It's a shame to have tests that stop the test suite for 5 seconds.  It always
> feels like an unsatsifactory hack to me.  

Me too.

> Would it be better to directly update
> the mtime of those files in the tests instead?

No, because the code specifically checks the ctime to guard against
files which are new but whose mtime has been rewound. :)

But responding to this did make me think of something else: we can get a
bit closer by looking at an older file outside of the test directory,
such as say the oldest file in the bzr source directory.  We only need
read access to prove the cache can hit.  That should be pretty
straightforward.

But how to automatically test the case of starting with an old file,
caching it, then updating it, without actually delaying?

-- 
Martin




More information about the bazaar mailing list