Skip to content

Commit

Permalink
Further explanation of the issues surrounding the test that had to be…
Browse files Browse the repository at this point in the history
… disabled
  • Loading branch information
gus-asf committed Nov 8, 2024
1 parent 86080b0 commit ca996af
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,24 @@ 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.

// 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?

// assertJQ(req("q", q, "timeAllowed", "2", "sleep", sleep), assertionString);

// The idea that the request won't time out due to caching is a flawed test methodology,
// It relies on the test running quickly and not stalling. The above test should possibly
// be doing something along the lines of this (but we lack api for it)
//
// SolrCores solrCores = ExitableDirectoryReaderTest.h.getCoreContainer().solrCores;
// List<SolrCore> cores = solrCores.getCores();
// for (SolrCore core : cores) {
// if (<<< find the right core >>> ) {
// ((SolrCache)core.getSearcher().get().<<<check cache for a key like name:a* >>>
// }
// }

// now do the same for the filter cache
// 2024-4-15: this still passes probably because *:* is so fast, but it still worries me
assertJQ(req("q", "*:*", "fq", q, "timeAllowed", "1", "sleep", sleep), failureAssertionString);
Expand Down

0 comments on commit ca996af

Please sign in to comment.