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

Refactor sparse vector integration tests #72

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Sep 10, 2024

Problem

We had a ticket logged for making sure that we covered working with sparse vectors in integration tests.

Solution

I realized we were already creating sparse vectors whenever we called createVectorsForUpsert, but the function was a bit unwieldy to work with.

I refactored things into a new helper func GenerateVectors(numOfVectors int, dimension int32, isSparse bool) []*Vector. This is a bit more flexible.

I also cleaned up how we were handling the IntegrationTest.vectorIds field on the test struct. I wanted to make sure we were consistently adding to and deleting from this collection across tests.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Existing integration tests should pass.


Copy link
Contributor

@haruska haruska left a comment

Choose a reason for hiding this comment

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

👍

@austin-denoble austin-denoble merged commit b0e8307 into main Sep 10, 2024
2 checks passed
@austin-denoble austin-denoble deleted the adenoble/upsert-integration-tests branch September 10, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants