Skip to content

test(e2e): enable parallel execution for multiple tests#79

Merged
ZiyangLinScality merged 2 commits intomainfrom
improvement/parallel-mutiple-tests
Feb 2, 2026
Merged

test(e2e): enable parallel execution for multiple tests#79
ZiyangLinScality merged 2 commits intomainfrom
improvement/parallel-mutiple-tests

Conversation

@ZiyangLinScality
Copy link
Copy Markdown
Contributor

@ZiyangLinScality ZiyangLinScality commented Jan 30, 2026

  • Added t.Parallel() to various end-to-end tests to allow concurrent execution, improving test efficiency and reducing overall runtime.
  • Updated tests across multiple files, including cascade GC, multi-namespace, namespace deletion, pod lifecycle.

- Added `t.Parallel()` to various end-to-end tests to allow concurrent execution, improving test efficiency and reducing overall runtime.
- Updated tests across multiple files, including cascade GC, multi-namespace, namespace deletion, pod lifecycle, and real HTTP tests.
Copilot AI review requested due to automatic review settings January 30, 2026 16:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds t.Parallel() to multiple end-to-end tests to enable concurrent execution, aiming to improve test efficiency and reduce overall runtime.

Changes:

  • Added t.Parallel() to 13 test functions across 6 test files
  • Tests span cascade GC, multi-namespace operations, namespace deletion, pod lifecycle, HTTP behavior, and basic operator functionality

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/e2e/real_http_test.go Added parallel execution to 4 HTTP-related tests that verify reconcile storm prevention, timeout handling, recovery after failure, and fetch triggering
test/e2e/pod_lifecycle_test.go Added parallel execution to 3 pod lifecycle tests including rolling updates and operator crash recovery tests
test/e2e/namespace_deletion_test.go Added parallel execution to namespace deletion cascade cleanup test
test/e2e/multi_namespace_test.go Added parallel execution to 2 multi-namespace tests for component aggregation and partial deletion
test/e2e/e2e_test.go Added parallel execution to 3 core tests covering CRD installation, operator deployment, and full chain smoke test
test/e2e/cascade_gc_test.go Added parallel execution to 2 cascade garbage collection tests for exposer updates and deletion cleanup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

func TestPodLifecycle_OperatorCrashRecovery(t *testing.T) {
t.Parallel()
Copy link

Copilot AI Jan 30, 2026

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.

Suggested change
t.Parallel()

Copilot uses AI. Check for mistakes.
}

func TestPodLifecycle_NoSpuriousUpdatesAfterRestart(t *testing.T) {
t.Parallel()
Copy link

Copilot AI Jan 30, 2026

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 469), which affects the entire cluster. Running this test in parallel with TestPodLifecycle_OperatorCrashRecovery (which also deletes the operator pod at line 294) 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.

Copilot uses AI. Check for mistakes.
- Removed `t.Parallel()` from multiple real HTTP end-to-end tests to ensure sequential execution, addressing potential issues with shared state and resource contention during tests.
- This change aims to improve test reliability and maintainability.
@ZiyangLinScality ZiyangLinScality merged commit dd11339 into main Feb 2, 2026
3 checks passed
@ZiyangLinScality ZiyangLinScality deleted the improvement/parallel-mutiple-tests branch February 2, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants