Skip to content

Conversation

@thiagohora
Copy link
Contributor

Details

Change checklist

  • User facing
  • Documentation update

Issues

  • Resolves #
  • OPIK-

Testing

Documentation

- Configure Maven Surefire plugin for class-level parallelization (2 threads per core)
- Add JUnit Platform properties for controlled parallel execution
- Preserve @testinstance(PER_CLASS) behavior within test classes
- Add comprehensive PARALLEL_TESTING.md documentation

Parallel execution strategy:
- Test classes run in parallel (concurrent)
- Tests within a class run sequentially (same_thread)
- Dynamic thread pool: 2 threads per CPU core
- Each fork gets 2GB memory (-Xmx2g)

Expected performance improvement: 8x speedup on 4-core machines (2-3 hours → 20-30 minutes)

Testcontainers with reuse=true are shared across test classes safely, with unique container IDs preventing conflicts.
- Configure Maven Surefire to use 2 parallel forks for faster test execution
- Set forkCount=2 to run test classes in 2 separate JVM processes
- Allocate 4GB heap per fork (2 * 4GB = 8GB total heap)
- Keep reuseForks=false to prevent Quartz Scheduler conflicts
- Add JUnit platform properties for class-level parallelization
- Create comprehensive parallel testing documentation

Configuration balances parallelism with memory constraints:
- 2 forks * 4GB = 8GB heap + ~4GB overhead = 12GB total
- JUnit runs test classes concurrently within each fork
- Tests within a class run sequentially (preserves @testinstance PER_CLASS)
- 4GB per fork should handle most test suites including large payloads

Requires at least 12-16GB system RAM for stable operation.
If OOM errors occur, consider reducing to forkCount=1 with -Xmx6g.
@github-actions github-actions bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file Backend tests Including test files, or tests related like configuration. labels Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

📋 PR Linter Failed

Invalid Title Format. Your PR title must include a ticket/issue number and may optionally include component tags ([FE], [BE], etc.).

  • Internal contributors: Open a JIRA ticket and link to it: [OPIK-xxxx] or [CUST-xxxx] or [DND-xxxx] or [DEV-xxxx] [COMPONENT] Your change
  • External contributors: Open a Github Issue and link to it via its number: [issue-xxxx] [COMPONENT] Your change
  • No ticket: Use [NA] [COMPONENT] Your change (Issues section not required)

Example: [issue-3108] [BE] [FE] Fix authentication bug or [OPIK-1234] Fix bug or [NA] Update README


Incomplete Details Section. The ## Details section cannot be empty.


Incomplete Issues Section. You must reference at least one GitHub issue (#xxxx), Jira ticket (OPIK-xxxx), CUST ticket (CUST-xxxx), DEV ticket (DEV-xxxx), or DND ticket (DND-xxxx) under the ## Issues section.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Backend Tests Results

  297 files    297 suites   1h 44m 55s ⏱️
5 674 tests 5 664 ✅ 7 💤 2 ❌ 1 🔥
5 620 runs  5 611 ✅ 7 💤 2 ❌

For more details on these failures and errors, see this check.

Results for commit 6120b55.

@thiagohora thiagohora closed this Dec 5, 2025
- Change forkCount from 2 to 4 for higher parallelism
- Requires 16GB heap (4 forks * 4GB) + ~4GB overhead = 20GB total RAM
- Provides better test execution speed on systems with sufficient memory
- Systems with 12GB RAM should use forkCount=2 instead
@thiagohora thiagohora reopened this Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

📋 PR Linter Failed

Invalid Title Format. Your PR title must include a ticket/issue number and may optionally include component tags ([FE], [BE], etc.).

  • Internal contributors: Open a JIRA ticket and link to it: [OPIK-xxxx] or [CUST-xxxx] or [DND-xxxx] or [DEV-xxxx] [COMPONENT] Your change
  • External contributors: Open a Github Issue and link to it via its number: [issue-xxxx] [COMPONENT] Your change
  • No ticket: Use [NA] [COMPONENT] Your change (Issues section not required)

Example: [issue-3108] [BE] [FE] Fix authentication bug or [OPIK-1234] Fix bug or [NA] Update README


Incomplete Details Section. The ## Details section cannot be empty.


Incomplete Issues Section. You must reference at least one GitHub issue (#xxxx), Jira ticket (OPIK-xxxx), CUST ticket (CUST-xxxx), DEV ticket (DEV-xxxx), or DND ticket (DND-xxxx) under the ## Issues section.

@thiagohora thiagohora closed this Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants