Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support the properties param in the create database api #379

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

SimFG
Copy link
Contributor

@SimFG SimFG commented Nov 25, 2024

No description provided.

Copy link
Contributor

@shanghaikid shanghaikid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add test like this:

it(`Create Collection with property set should be successful`, async () => {
    const res = await milvusClient.createCollection({
      ...genCollectionParams({
        collectionName: COLLECTION_WITH_PROPERTY,
        dim: [128],
      }),
      properties: {
        'collection.ttl.seconds': 1000,
        'mmap.enabled': true,
      },
    });
    expect(res.error_code).toEqual(ErrorCode.SUCCESS);

    const describe = await milvusClient.describeCollection({
      collection_name: COLLECTION_WITH_PROPERTY,
    });

    expect(
      Number(
        formatKeyValueData(describe.properties, ['collection.ttl.seconds'])[
          'collection.ttl.seconds'
        ]
      )
    ).toEqual(1000);

    expect(
      Boolean(
        formatKeyValueData(describe.properties, ['mmap.enabled'])['mmap.enabled']
      )
    ).toEqual(true);

    // drop collection
    await milvusClient.dropCollection({
      collection_name: COLLECTION_WITH_PROPERTY,
    });
  });

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shanghaikid, SimFG

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shanghaikid shanghaikid merged commit ecd16c9 into milvus-io:main Nov 25, 2024
2 of 3 checks passed
shanghaikid pushed a commit that referenced this pull request Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants