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.
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: tests/test_ hashcache. py' tests/test_ hashcache. py 2006-09-20 14:03:05 +0000 tests/test_ hashcache. py 2006-12-10 15:13:17 +0000
self. assertEquals( hc.get_ sha1('foo' ), sha1('contents')) hashcache( )
self. assertEquals( hc.get_ sha1('foo' ), sha1('contents'))
self. assertEquals( hc.hit_ count, 1)
=== modified file 'bzrlib/
--- bzrlib/
+++ bzrlib/
@@ -87,6 +87,7 @@
pause()
hc.write()
+ pause()
hc = self.reopen_
It really is weird that we would be treating the file as recently modified. Even more so that you have a 95% miss rate.