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
[X] Infrastructure change (CI configs, etc)
[ ] Non-code change (docs, etc)
[ ] None of the above: (explain here)
Test Plan
Existing integration tests should pass.
To see the specific tasks where the Asana app for GitHub is being used, see below:
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
Test Plan
Existing integration tests should pass.