Apache Lucene open-source search software
Add assumption to ignore occasional test failures due to disconnected graphs (#14696)
Michael Sokolov86091d379820
diff --git a/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java b/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.javaindex 83156237517..399f7de3388 100644--- a/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java+++ b/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java@@ -491,6 +491,7 @@ abstract class BaseVectorSimilarityQueryTestCase<try (Directory indexStore = getIndexStore(vectors);IndexReader reader = DirectoryReader.open(indexStore)) {+ assumeTrue("graph is fully reachable", HnswUtil.graphIsRooted(reader, vectorField));IndexSearcher searcher = newSearcher(reader);// This query is cacheable, explicitly prevent it@@ -504,7 +505,6 @@ abstract class BaseVectorSimilarityQueryTestCase<Float.NEGATIVE_INFINITY,Float.NEGATIVE_INFINITY,null));-assertEquals(numDocs, searcher.count(query)); // Expect some results without timeoutsearcher.setTimeout(() -> true); // Immediately timeout