Skip to content

Commit

Permalink
return false for timeout case in WaitUntilIndexReady
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-denoble committed Aug 22, 2024
1 parent d29b380 commit a849edb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pinecone/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,13 @@ func WaitUntilIndexReady(ts *IntegrationTests, ctx context.Context) (bool, error

totalSeconds := time.Since(start)

if totalSeconds >= maxWaitTimeSeconds {
return false, fmt.Errorf("Index \"%s\" not ready after %f seconds", ts.idxName, totalSeconds.Seconds())
}

fmt.Printf("Index \"%s\" not ready yet, retrying... (%f/%f)\n", ts.idxName, totalSeconds.Seconds(), maxWaitTimeSeconds.Seconds())
time.Sleep(delay)
}

}

func createVectorsForUpsert() []*Vector {
Expand Down

0 comments on commit a849edb

Please sign in to comment.