Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public static class SearchObject<T> {
@AllArgsConstructor
@ToString
public static class SearchMetadata {
String id;
Float distance;
Float[] vector;
public final String id;
public final Float distance;
public final Float[] vector;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
Expand Down Expand Up @@ -190,6 +191,16 @@ public void testORMClient() {

int count = countGRPC(result);
assertEquals(K, count, String.format("must return K=%d results", K));

Assertions.assertThat(result.objects).allSatisfy(
object -> {
Assertions.assertThat(object.metadata.id)
.isNotNull().as("must retrieve id");
Assertions.assertThat(object.metadata.vector)
.isNotNull().as("must retrieve vector")
.hasSize(VECTOR_LEN).as("vector has expected size");
});

}, WARMUP_ROUNDS, BENCHMARK_ROUNDS);
}

Expand Down