From 7823e5a2eb55b7ca4828ad16d4b29a50dea6259f Mon Sep 17 00:00:00 2001 From: Mayya Sharipova Date: Thu, 21 Oct 2021 17:25:53 -0400 Subject: [PATCH] Enhance testKnnVectorsFormat test (#79615) Test the output of toString method as it is available now. Relates to #79193 --- .../xpack/vectors/mapper/DenseVectorFieldMapperTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/mapper/DenseVectorFieldMapperTests.java b/x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/mapper/DenseVectorFieldMapperTests.java index ff80198eff6d9..74c160ee3f55f 100644 --- a/x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/mapper/DenseVectorFieldMapperTests.java +++ b/x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/mapper/DenseVectorFieldMapperTests.java @@ -384,6 +384,8 @@ public void testKnnVectorsFormat() throws IOException { assertThat(codec, instanceOf(PerFieldMapperCodec.class)); KnnVectorsFormat knnVectorsFormat = ((PerFieldMapperCodec) codec).getKnnVectorsFormatForField("field"); assertThat(knnVectorsFormat, instanceOf(Lucene90HnswVectorsFormat.class)); - //TODO: add more assertions once LUCENE-10178 is implemented + String expectedString = "Lucene90HnswVectorsFormat(name = Lucene90HnswVectorsFormat, maxConn = " + m + + ", beamWidth=" + efConstruction + ")"; + assertEquals(expectedString, knnVectorsFormat.toString()); } }