-
Notifications
You must be signed in to change notification settings - Fork 0
test(e2e): enable parallel execution for multiple tests #79
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ const ( | |
| ) | ||
|
|
||
| func TestPodLifecycle_RollingUpdateOnConfigChange(t *testing.T) { | ||
| t.Parallel() | ||
| feature := features.New("rolling-update-on-config-change"). | ||
| Setup(func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context { | ||
| client := cfg.Client() | ||
|
|
@@ -214,6 +215,7 @@ func TestPodLifecycle_RollingUpdateOnConfigChange(t *testing.T) { | |
| } | ||
|
|
||
| func TestPodLifecycle_OperatorCrashRecovery(t *testing.T) { | ||
| t.Parallel() | ||
| feature := features.New("operator-crash-recovery"). | ||
| WithLabel("disruptive", "true"). | ||
| Setup(func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context { | ||
|
|
@@ -362,6 +364,7 @@ func TestPodLifecycle_OperatorCrashRecovery(t *testing.T) { | |
| } | ||
|
|
||
| func TestPodLifecycle_NoSpuriousUpdatesAfterRestart(t *testing.T) { | ||
| t.Parallel() | ||
|
||
| feature := features.New("no-spurious-updates-after-restart"). | ||
| WithLabel("disruptive", "true"). | ||
| Setup(func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test deletes the operator pod as part of its execution (see line 294), which affects the entire cluster. Running this test in parallel with TestPodLifecycle_NoSpuriousUpdatesAfterRestart (which also deletes the operator pod at line 469) can cause race conditions and test flakiness. These two tests should not run in parallel because they both manipulate the shared operator deployment. Consider either removing t.Parallel from both these disruptive tests, or implementing a synchronization mechanism (such as a mutex or test label filtering) to ensure they run sequentially.