Skip to content

Commit

Permalink
feat: Lower number of iterations when creating user (#1416)
Browse files Browse the repository at this point in the history
feat: Lower number of iterations here

When we are creating 100 users in Load test in CI cluster it takes 30+
iterations to create first user. Adding 1 second delay will lower amount
of output we are getting from this function given the price of about 0.5
seconds longer user creation.
  • Loading branch information
jhutar authored Oct 11, 2024
1 parent b1bb741 commit b2ed0c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sandbox/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func (s *SandboxController) CheckUserCreated(userName string) (compliantUsername
}

func (s *SandboxController) CheckUserCreatedWithSignUp(userName string, userSignup *toolchainApi.UserSignup) (compliantUsername string, err error) {
err = utils.WaitUntil(func() (done bool, err error) {
err = utils.WaitUntilWithInterval(func() (done bool, err error) {
err = s.KubeRest.Get(context.Background(), types.NamespacedName{
Namespace: DEFAULT_TOOLCHAIN_NAMESPACE,
Name: userName,
Expand All @@ -346,7 +346,7 @@ func (s *SandboxController) CheckUserCreatedWithSignUp(userName string, userSign
}
GinkgoWriter.Printf("Waiting for UserSignup %s to have condition Complete:True\n", userSignup.GetName())
return false, nil
}, 4*time.Minute)
}, 4*time.Second, 4*time.Minute)

if err != nil {
return "", err
Expand Down

0 comments on commit b2ed0c1

Please sign in to comment.