Comment 5 for bug 70272

Revision history for this message
John A Meinel (jameinel) wrote :

I can't really see why the test would be so sensitive, since it is giving a 5 second delay between writing the file, and checking its stat and sha hash.
And our code is written to cache the sha hash if the timestamp is older than 2 seconds or so.

Can you try this patch:
=== modified file 'bzrlib/tests/test_hashcache.py'
--- bzrlib/tests/test_hashcache.py 2006-09-20 14:03:05 +0000
+++ bzrlib/tests/test_hashcache.py 2006-12-10 15:13:17 +0000
@@ -87,6 +87,7 @@
         pause()
         self.assertEquals(hc.get_sha1('foo'), sha1('contents'))
         hc.write()
+ pause()
         hc = self.reopen_hashcache()
         self.assertEquals(hc.get_sha1('foo'), sha1('contents'))
         self.assertEquals(hc.hit_count, 1)

It really is weird that we would be treating the file as recently modified. Even more so that you have a 95% miss rate.