fsparv commented on code in PR #2801:
URL: https://github.com/apache/solr/pull/2801#discussion_r1834649523
##########
solr/core/src/test/org/apache/solr/core/ExitableDirectoryReaderTest.java:
##########
@@ -70,9 +70,12 @@ public void testPrefixQuery() throws Exception {
// this time we should get a query cache hit and hopefully no exception?
this may change in the
// future if time checks are put into other places.
- assertJQ(req("q", q, "timeAllowed", "1", "sleep", sleep), assertionString);
+ // 2024-4-15: it did change..., and now this fails with 1 or 2 ms and
passes with 3ms... I see
+ // no way this won't be terribly brittle. Maybe TestInjection of some sort
to bring this back?
Review Comment:
I just looked at the ability to check directly. There is some hope since we
could
```
SolrCores solrCores =
ExitableDirectoryReaderTest.h.getCoreContainer().solrCores;
List<SolrCore> cores = solrCores.getCores();
for (SolrCore core : cores) {
// identify core we need here...
}
```
but assuming we can identify the appropriate core, there isn't even an
internal api to check caches. Would look for something steming from
`core.getSearcher().get().???` but we would need to add an accessor for the
queryCache and then on SolrCache a way to inspect the keys of the cache...
that seems way beyond what this change should attempt.
--
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]