diff --git a/pinecone/test_suite.go b/pinecone/test_suite.go index 73b6a9c..d1ecb11 100644 --- a/pinecone/test_suite.go +++ b/pinecone/test_suite.go @@ -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 {