Skip to content

Commit

Permalink
add longer sleeps to configure index calls for scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-denoble committed Jan 7, 2025
1 parent c3e91ef commit 9469c5b
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions pinecone/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,8 @@ func (ts *IntegrationTests) TestConfigureIndexScaleUpNoPods() {
_, err = ts.client.ConfigureIndex(context.Background(), name, ConfigureIndexParams{Replicas: 2})
require.NoError(ts.T(), err)

// give index a bit of time to start upgrading before we poll
time.Sleep(2 * time.Second)

isReady, _ := WaitUntilIndexReady(ts, context.Background())
require.True(ts.T(), isReady, "Expected index to be ready")

time.Sleep(2 * time.Second)
// give index a bit of time to upgrade
time.Sleep(20 * time.Second)

err = ts.client.DeleteIndex(context.Background(), name)
require.NoError(ts.T(), err)
Expand All @@ -240,13 +235,8 @@ func (ts *IntegrationTests) TestConfigureIndexScaleUpNoReplicas() {
_, err = ts.client.ConfigureIndex(context.Background(), name, ConfigureIndexParams{PodType: "p1.x4"})
require.NoError(ts.T(), err)

// give index a bit of time to start upgrading before we poll
time.Sleep(2 * time.Second)

isReady, _ := WaitUntilIndexReady(ts, context.Background())
require.True(ts.T(), isReady, "Expected index to be ready")

time.Sleep(2 * time.Second)
// give index a bit of time to upgrade
time.Sleep(20 * time.Second)

err = ts.client.DeleteIndex(context.Background(), name)
require.NoError(ts.T(), err)
Expand Down

0 comments on commit 9469c5b

Please sign in to comment.