Re: [JGIT PATCH] Fix WindowCacheGetTest.testCache_TooSmallLimit failures
lördag 25 juli 2009 22:00:56 skrev "Shawn O. Pearce" <spearce@spearce.org>:
Show 14 quoted lines
> Ever since 2d77d30b5f when I rewrote WindowCache we have been seeing
> random failures inside of the TooSmallLimit test case.
>
> These test failures have been occurring because the cache contained
> more open bytes than it was configured to permit.
>
> The cache was permitted to open more bytes than its configured limit
> because the eviction routine was always skipping the last bucket
> under some conditions. If the cache table was sized the same as its
> evictBatch, which happens for any fairly small table, the eviction
> routine broke too early if it started at a non-zero position in the
> table and wrapped around during its search. By breaking too early
> the routine did not actually perform an eviction, leaving windows
> open it should have closed.
We should have a test for that then.
-- robin