Skip to content

Commit

Permalink
Add timeout of 1 Minute to override default timeout of 30 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdt-rabobank committed Oct 29, 2024
1 parent e7caf30 commit e627294
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions commands/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package commands
import (
"fmt"
"strings"
"time"

routing_api "code.cloudfoundry.org/routing-api"
"github.com/cloudfoundry-community/go-cfclient"
Expand Down Expand Up @@ -117,18 +118,21 @@ func InitializePeekManagers(baseCommand BaseCFConfigCommand, peek bool, ldapMgr
ClientSecret: baseCommand.ClientSecret,
UserAgent: userAgent,
}

cv3, err = v3config.NewClientSecret(fmt.Sprintf("https://api.%s", cfMgmt.SystemDomain),
baseCommand.UserID,
baseCommand.ClientSecret)
if err != nil {
return nil, err
}
}

client, err := cfclient.NewClient(c)
if err != nil {
lo.G.Errorf("Error obtaining a New CF Client: %s", err)
return nil, err
}
cv3.WithRequestTimeout(time.Minute)
cv3.WithSkipTLSValidation(true)
v3client, err := v3cfclient.New(cv3)
if err != nil {
Expand Down

0 comments on commit e627294

Please sign in to comment.