Skip to content

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Oct 11, 2025

Overview

This comprehensive refactoring modernizes the Maven integration test suite by removing version range dependencies from constructors and implementing automatic test ordering for better concurrent execution.

Key Changes

🔧 Core Refactoring

  • Removed version range constructors from AbstractMavenIntegrationTestCase
  • Updated 500+ integration test classes to remove version range parameters from constructors
  • Replaced version constraints with standard @since javadoc tags and @Disabled annotations
  • Removed empty constructors that only contained super(); calls

📋 Test Ordering

  • Implemented TestSuiteOrdering class for consistent test execution
  • Orders tests by prefix (gh-xxx, mng-xxx, it-xxx) in descending order
  • Ensures newer tests run first for better fail-fast behavior in concurrent execution
  • Replaces the previous TestSuiteOrdering with improved automatic ordering logic

🎯 Examples of Changes

Before:

public class MavenIT0051ReleaseProfileTest extends AbstractMavenIntegrationTestCase {
    public MavenIT0051ReleaseProfileTest() {
        super("(2.0.2,4.0.0-alpha-1)");
    }
}

After:

@Disabled("Bounds: (2.0.2,4.0.0-alpha-1)")
public class MavenIT0051ReleaseProfileTest extends AbstractMavenIntegrationTestCase {
    // Constructor removed - no longer needed
}

Benefits

Cleaner Codebase: Removed over 2,500 lines of boilerplate code
Better Documentation: Version constraints now clearly documented via standard annotations
Improved Test Execution: Automatic ordering ensures newer tests run first for faster feedback
Maintainability: Easier to understand and modify test constraints
Backward Compatibility: All existing functionality preserved while removing technical debt

This refactoring makes the integration test suite cleaner and more maintainable.


Pull Request opened by Augment Code with guidance from the PR author

@gnodet gnodet force-pushed the refactor/remove-version-ranges-from-integration-tests branch 3 times, most recently from 34279af to 3bcb6fd Compare October 15, 2025 09:55
@gnodet gnodet marked this pull request as ready for review October 15, 2025 19:36
@gnodet gnodet added this to the 4.1.0 milestone Oct 15, 2025
…atic test ordering

This comprehensive refactoring modernizes the Maven integration test suite by:

**Core Changes:**
- Remove version range constructors from AbstractMavenIntegrationTestCase
- Update 500+ integration test classes to remove version range parameters
- Replace version constraints with @SInCE javadoc tags and @disabled annotations
- Remove empty constructors that only contained super() calls

**Test Ordering:**
- Implement AutomaticTestOrdering class for consistent test execution
- Order tests by prefix (gh-xxx, mng-xxx, it-xxx) in descending order
- Ensure newer tests run first for better fail-fast behavior in concurrent execution
- Remove obsolete TestSuiteOrdering class

**Benefits:**
- Cleaner, more maintainable codebase with reduced boilerplate
- Backward compatibility maintained while removing technical debt
@gnodet gnodet force-pushed the refactor/remove-version-ranges-from-integration-tests branch from 4d5eb89 to c9a6ffd Compare October 17, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants