apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.45k stars 975 forks source link

Fix test failure TestKnnByteVectorQuery#testTimeLimitingKnnCollectorManager #13312

Closed easyice closed 2 months ago

easyice commented 2 months ago

TopKnnCollectorManager#newCollector will return MultiLeafKnnCollector instance if the index has multiple segments

org.apache.lucene.search.TestKnnByteVectorQuery > testTimeLimitingKnnCollectorManager FAILED
    java.lang.AssertionError
        at __randomizedtesting.SeedInfo.seed([A0DCCB76BFBF940C:8E1E7418F5C62B46]:0)
        at org.junit.Assert.fail(Assert.java:87)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at org.junit.Assert.assertTrue(Assert.java:53)
        at org.apache.lucene.search.BaseKnnVectorQueryTestCase.testTimeLimitingKnnCollectorManager(BaseKnnVectorQueryTestCase.java:787)
        at org.apache.lucene.search.TestKnnByteVectorQuery.testTimeLimitingKnnCollectorManager(TestKnnByteVectorQuery.java:30)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
gradlew test --tests TestKnnByteVectorQuery.testTimeLimitingKnnCollectorManager -Dtests.seed=A0DCCB76BFBF940C -Dtests.nightly=true