Skip to content

Commit

Permalink
Enhance testKnnVectorsFormat test (elastic#79615)
Browse files Browse the repository at this point in the history
Test the output of toString method as it is available now.

Relates to elastic#79193
  • Loading branch information
mayya-sharipova authored and Adam Locke committed Oct 28, 2021
1 parent 9717fe8 commit 3c1a74d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 3c1a74d

Please sign in to comment.