iprithv commented on code in PR #16103:
URL: https://github.com/apache/lucene/pull/16103#discussion_r3340003394
##########
lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java:
##########
@@ -2669,9 +2669,11 @@ protected void onCacheEntryEvicted(Object readerCoreKey,
Query query, long ramBy
}
};
- // Force exactly 1 segment so cache behavior is deterministic
Review Comment:
got it now. I made this change because `testUnifiedCacheEntryCallbacks`
failed in CI.
expected exactly 1 segment expected:<1> but was:<2>
`newIndexWriterConfig()` can randomize settings such as the RAM buffer size.
so here, the randomized settings caused the 3 documents to be flushed into 2
segments before `commit()`, but the test expects exactly 1 segment. when I
changed to `new IndexWriterConfig()` it avoided that randomization and gave
stable defaults, so the test consistently creates a single segment now.
without this change, the test can fail depending on the random seed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]