java-sdk
java-sdk copied to clipboard
Optimize CI/CD build times - Integration tests timing
The CI/CD pipeline is experiencing timeouts during integration tests, specifically for Spring Boot 3.3.9. The build job Build jdk:17 sb:3.3.x exp:false is being cancelled after exceeding the 30-minute execution limit, as seen in this failed run.
Current State
- Integration tests are taking longer than 30 minutes to complete
- The workflow includes resource-intensive operations, for ex:
- Docker container setup (MongoDB, Kafka)
- Dapr CLI and runtime initialization
- Complex workflow testing with external dependencies
- Tests run sequentially without parallelization
Proposed Solutions
Parallel Test Execution
- Enable Maven Surefire parallel execution for unit tests
- Configure Maven Failsafe for parallel integration tests
- Add parallel module building with
-Tflags
Split Workflow Strategy
- Separate unit tests from integration tests into different jobs
- Run unit tests first and in parallel
- Only run integration tests (in parallel) after unit tests pass
- Use focused timeouts for each job type
Test Optimization
- Review and optimize slow integration tests
Expected Benefits
- Reduce overall build time by ~30-50%
- Eliminate timeout issues
- Improve developer experience with faster feedback at PR time
- Reduce CI/CD resource usage
Acceptance Criteria
- [ ] Build completes within reasonable time (< 20 minutes)
- [ ] All existing tests continue to pass
- [ ] No regression in test coverage
- [ ] Maintainable and clear CI/CD configuration
I think we should close this one now..