Skip to content

Commit 73218c4

Browse files
committed
Fix flakey test
1 parent 9945226 commit 73218c4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/collections/data/integration.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,11 +1020,13 @@ describe('Testing of BYOV insertion with legacy vectorizer', () => {
10201020
it('should insert and retrieve many vectors using the new client', async () => {
10211021
const client = await weaviate.connectToLocal();
10221022
const collection = client.collections.get(collectionName);
1023-
await collection.data.insertMany([{ vectors: [1, 2, 3] }, { vectors: [4, 5, 6] }]);
1024-
const objects = await collection.query.fetchObjects({ includeVector: true }).then((res) => res.objects);
1025-
expect(objects.length).toEqual(2);
1026-
expect(objects[0].vectors.default).toEqual([1, 2, 3]);
1027-
expect(objects[1].vectors.default).toEqual([4, 5, 6]);
1023+
const { uuids } = await collection.data.insertMany([{ vectors: [1, 2, 3] }, { vectors: [4, 5, 6] }]);
1024+
await collection.query
1025+
.fetchObjectById(uuids[0], { includeVector: true })
1026+
.then((res) => expect(res?.vectors.default).toEqual([1, 2, 3]));
1027+
await collection.query
1028+
.fetchObjectById(uuids[1], { includeVector: true })
1029+
.then((res) => expect(res?.vectors.default).toEqual([4, 5, 6]));
10281030
});
10291031

10301032
it('should insert and retrieve single vectors using the new client', async () => {

0 commit comments

Comments
 (0)