Skip to content

Commit

Permalink
Fixes issue with Cottontail DB version of this test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph Gasser committed Aug 14, 2024
1 parent 0ce0a07 commit 6607457
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ abstract class AbstractFloatVectorDescriptorReaderTest(schemaPath: String) : Abs

/* Generate and store test data. */
val descriptors = this.initialize(writer, random)
reader.getAll().forEachIndexed { index, floatVectorDescriptor ->
Assertions.assertEquals(descriptors[index].id, floatVectorDescriptor.id)
Assertions.assertEquals(descriptors[index].retrievableId, floatVectorDescriptor.retrievableId)
Assertions.assertArrayEquals(descriptors[index].vector.value, floatVectorDescriptor.vector.value)
reader.getAll().forEach { descriptor ->
Assertions.assertTrue(descriptors.find { it.id == descriptor.id } != null)
Assertions.assertTrue(descriptors.find { it.retrievableId == descriptor.retrievableId } != null)
Assertions.assertTrue(descriptors.find { it.vector.value.contentEquals(descriptor.vector.value) } != null)
}
}

Expand All @@ -62,8 +62,8 @@ abstract class AbstractFloatVectorDescriptorReaderTest(schemaPath: String) : Abs
/* Generate and store test data. */
val descriptors = this.initialize(writer, random)
val selection = descriptors.shuffled().take(100).map { it.id }
reader.getAll(selection).forEach{ floatVectorDescriptor ->
Assertions.assertTrue(selection.contains(floatVectorDescriptor.id))
reader.getAll(selection).forEach{ descriptor ->
Assertions.assertTrue(selection.contains(descriptor.id))
}
}

Expand Down

0 comments on commit 6607457

Please sign in to comment.