Optimize package registry tests to reduce CI/CD pipeline failures
What does this MR do and why?
Files Modified:
1. maven_gradle_repository_spec.rb
-
Added
let_it_befor immutable resources (personal_access_token, group_id, package_version, etc.) -
Kept per-test resources isolated (project, runner, deploy_token) to prevent interference
-
Added comprehensive cleanup (runner cleanup, package cleanup)
-
Expected improvement: ~40-50% performance improvement with full test isolation
2. maven_group_level_spec.rb
-
Added comprehensive cleanup tasks to address shared context issues:
-
Package cleanup to prevent interference
-
Group settings cleanup to reset state
-
CI variables cleanup to prevent conflicts
-
Added error handling for all cleanup operations
-
Expected improvement: ~80% reduction in test interference failures
Expected Impact:
-
Pipeline Failures: Reduce for these test files
-
Test Reliability: Much more stable and predictable
-
Resource Usage: More efficient use of test resources
-
Debugging: Better logging and error handling
References
Related to:
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.