Skip to content

Commit 93747bd

Browse files
committed
update comment
1 parent d06fc06 commit 93747bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCacheTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,9 @@ public void testHitsMissesAndEvictionsStats() throws Exception {
558558
final BitSet bitSet2 = cache.getBitSet(query2, leafContext);
559559
assertThat(bitSet2, notNullValue());
560560

561-
// szymon: bug I believe, created issue: https://github.com/elastic/elasticsearch/issues/132842
562-
// assertBusy can be removed once the bug is fixed.
561+
// szymon: eviction callback calls `get` on the cache, asynchronously, which updates the stats.
562+
// so assertion is current state of the code, rather than the expected state.
563+
// issue: https://github.com/elastic/elasticsearch/issues/132842
563564
expectedStats.put("misses", 3L);
564565
expectedStats.put("evictions", 1L);
565566
assertBusy(() -> { assertThat(cache.usageStats(), equalTo(expectedStats)); }, 200, TimeUnit.MILLISECONDS);

0 commit comments

Comments
 (0)