fsparv commented on code in PR #2801:
URL: https://github.com/apache/solr/pull/2801#discussion_r1834603826


##########
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:
   What we really need for this test is a cache admin command that can list the 
contents of the a cache (and one would expect a manual clear capability too, 
though that's not needed here) One might be able to get by with a metrics call, 
looking for an increment in cache hits, but that's pretty heavy reliance on 
coincidence rather than explicit testing of the actual desired behavior.



-- 
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]

Reply via email to