Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove sleep from when/then in e2e tests #21008

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions test/e2e/fixture/account/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package project

import (
"testing"
"time"

"github.com/argoproj/argo-cd/v2/test/e2e/fixture"
"github.com/argoproj/argo-cd/v2/util/env"
Expand Down Expand Up @@ -46,7 +45,5 @@ func (c *Context) And(block func()) *Context {
}

func (c *Context) When() *Actions {
// in case any settings have changed, pause for 1s, not great, but fine
time.Sleep(1 * time.Second)
return &Actions{context: c}
}
2 changes: 0 additions & 2 deletions test/e2e/fixture/app/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ func (c *Context) And(block func()) *Context {
}

func (c *Context) When() *Actions {
// in case any settings have changed, pause for 1s, not great, but fine
time.Sleep(1 * time.Second)
return &Actions{context: c}
}

Expand Down
2 changes: 0 additions & 2 deletions test/e2e/fixture/applicationsets/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ func Given(t *testing.T) *Context {
}

func (c *Context) When() *Actions {
// in case any settings have changed, pause for 1s, not great, but fine
time.Sleep(1 * time.Second)
return &Actions{context: c}
}

Expand Down
3 changes: 0 additions & 3 deletions test/e2e/fixture/cluster/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cluster

import (
"testing"
"time"

"github.com/argoproj/argo-cd/v2/test/e2e/fixture"
"github.com/argoproj/argo-cd/v2/util/env"
Expand Down Expand Up @@ -60,8 +59,6 @@ func (c *Context) And(block func()) *Context {
}

func (c *Context) When() *Actions {
// in case any settings have changed, pause for 1s, not great, but fine
time.Sleep(1 * time.Second)
return &Actions{context: c}
}

Expand Down
4 changes: 0 additions & 4 deletions test/e2e/fixture/notification/actions.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package notification

import (
"time"

"github.com/argoproj/argo-cd/v2/test/e2e/fixture"
)

Expand All @@ -23,8 +21,6 @@ func (a *Actions) SetParamInNotificationConfigMap(key, value string) *Actions {

func (a *Actions) Then() *Consequences {
a.context.t.Helper()
// in case any settings have changed, pause for 1s, not great, but fine
time.Sleep(1 * time.Second)
return &Consequences{a.context, a}
}

Expand Down
3 changes: 0 additions & 3 deletions test/e2e/fixture/project/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package project

import (
"testing"
"time"

"github.com/argoproj/argo-cd/v2/test/e2e/fixture"
"github.com/argoproj/argo-cd/v2/util/env"
Expand Down Expand Up @@ -63,7 +62,5 @@ func (c *Context) And(block func()) *Context {
}

func (c *Context) When() *Actions {
// in case any settings have changed, pause for 1s, not great, but fine
time.Sleep(1 * time.Second)
return &Actions{context: c}
}
3 changes: 0 additions & 3 deletions test/e2e/fixture/repos/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package repos

import (
"testing"
"time"

"github.com/argoproj/argo-cd/v2/test/e2e/fixture"
"github.com/argoproj/argo-cd/v2/util/env"
Expand Down Expand Up @@ -55,8 +54,6 @@ func (c *Context) And(block func()) *Context {
}

func (c *Context) When() *Actions {
// in case any settings have changed, pause for 1s, not great, but fine
time.Sleep(1 * time.Second)
return &Actions{context: c}
}

Expand Down