Skip to content

Commit

Permalink
make sure to actually delete all the vectors and check for double the…
Browse files Browse the repository at this point in the history
… amount we were previously checking for because of multiple namespaces
  • Loading branch information
austin-denoble committed Sep 20, 2024
1 parent be98dd7 commit 7e3913a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pinecone/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ func (ts *LocalIntegrationTests) TearDownSuite() {
require.NoError(ts.T(), err)

// Delete vectors by filter
err = idxConn.DeleteVectorsByFilter(context.Background(), ts.metadata)
require.NoError(ts.T(), err)

// Delete all remaining vectors
err = idxConn.DeleteAllVectorsInNamespace(context.Background())
require.NoError(ts.T(), err)

description, err := idxConn.DescribeIndexStats(context.Background())
require.NoError(ts.T(), err)
Expand Down Expand Up @@ -194,6 +198,6 @@ func (ts *LocalIntegrationTests) TestDescribeIndexStats() {
require.NoError(ts.T(), err)

assert.NotNil(ts.T(), description, "Index description should not be nil")
assert.Equal(ts.T(), description.TotalVectorCount, uint32(len(ts.vectorIds)), "Index host should match")
assert.Equal(ts.T(), description.TotalVectorCount, uint32(len(ts.vectorIds)*2), "Index host should match")
}
}

0 comments on commit 7e3913a

Please sign in to comment.