Skip to content

Commit

Permalink
Fix 2.5 function tests (#378)
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <jiangruiyi@gmail.com>
  • Loading branch information
shanghaikid authored Nov 25, 2024
1 parent b7dff0d commit 835570d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions test/grpc/Functions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,20 @@ describe(`Functions schema API`, () => {
consistency_level: ConsistencyLevelEnum.Strong,
});

expect(query.status.error_code).toEqual(ErrorCode.SUCCESS);
expect(query.data.length).toEqual(10);
// data should have 'sparse' field
expect(query.data[0].hasOwnProperty('sparse')).toBeTruthy();
// data should have 'sparse2' field
expect(query.data[0].hasOwnProperty('sparse2')).toBeTruthy();
expect(query.status.error_code).toEqual(ErrorCode.UnexpectedError);
expect(query.status.reason).toEqual(
'not allowed to retrieve raw data of field sparse'
);

const query2 = await milvusClient.query({
collection_name: COLLECTION,
limit: 10,
expr: 'id > 0',
output_fields: ['vector', 'id', 'text'],
consistency_level: ConsistencyLevelEnum.Strong,
});

expect(query2.data.length).toEqual(10);
});

it(`search with varchar should success`, async () => {
Expand Down

0 comments on commit 835570d

Please sign in to comment.