Skip to content

Commit 86091d3

Browse files
authored
Add assumption to ignore occasional test failures due to disconnected graphs (#14696)
1 parent e600a50 commit 86091d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ public void testTimeout() throws IOException {
491491

492492
try (Directory indexStore = getIndexStore(vectors);
493493
IndexReader reader = DirectoryReader.open(indexStore)) {
494+
assumeTrue("graph is fully reachable", HnswUtil.graphIsRooted(reader, vectorField));
494495
IndexSearcher searcher = newSearcher(reader);
495496

496497
// This query is cacheable, explicitly prevent it
@@ -504,7 +505,6 @@ public void testTimeout() throws IOException {
504505
Float.NEGATIVE_INFINITY,
505506
Float.NEGATIVE_INFINITY,
506507
null));
507-
508508
assertEquals(numDocs, searcher.count(query)); // Expect some results without timeout
509509

510510
searcher.setTimeout(() -> true); // Immediately timeout

0 commit comments

Comments
 (0)