mirror of https://github.com/apache/lucene.git
Fix occasional failure in BaseKnnVectorsFormatTestCase#testIllegalDimensionTooLarge (#12467)
Depending whether a document with dimensions > maxDims created on a new segment or already existing segment, we may get different error messages. This fix adds another possible error message we may get. Relates to #12436
This commit is contained in:
parent
119635ad80
commit
155b2edbe3
|
@ -496,7 +496,10 @@ public abstract class BaseKnnVectorsFormatTestCase extends BaseIndexFileFormatTe
|
||||||
exc = expectThrows(IllegalArgumentException.class, () -> w.addDocument(doc3));
|
exc = expectThrows(IllegalArgumentException.class, () -> w.addDocument(doc3));
|
||||||
assertTrue(
|
assertTrue(
|
||||||
exc.getMessage()
|
exc.getMessage()
|
||||||
.contains("Inconsistency of field data structures across documents for field [f]"));
|
.contains("Inconsistency of field data structures across documents for field [f]")
|
||||||
|
|| exc.getMessage()
|
||||||
|
.contains(
|
||||||
|
"vector's dimensions must be <= [" + getVectorsMaxDimensions("f") + "]"));
|
||||||
w.flush();
|
w.flush();
|
||||||
|
|
||||||
Document doc4 = new Document();
|
Document doc4 = new Document();
|
||||||
|
|
Loading…
Reference in New Issue