You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The discovery TestCachePurgeCache sometimes fails because of wrong
assumptions of partial cache purging that don't always hold:
When the test reaches line 184, the cache (capacity of 4) might have:
identity2
identity3
identity4
identity5
and in lines 185-195 we load the cache with:
identity1, identity2, identity3, identity4
Therefore, the following scenario might happen:
- identity1 is being put, so identity2 is evicted
- identity2 is being put, so identity3 is evicted
- identity3 is being put, so identity4 is evicted
- identity4 is being put, so identity5 is evicted
We got 4 evictions so far, in contrast to the (false) assumption
of having between 1 and 2.
This test changes the identities that are loaded initiality in the warmup
phase to 4 instead of 5,
and in the next step - we start with identity5 to be sure we evicted
some identity, and then only put 2 identities and we just check that
the whole cache wasn't purged.
Change-Id: If28ae7db4adbc6319d95a3d41e954d8b420c7876
Signed-off-by: yacovm <yacovm@il.ibm.com>
0 commit comments