jenkinsci / aws-secrets-manager-credentials-provider-plugin

AWS Secrets Manager Credentials Provider for Jenkins
https://plugins.jenkins.io/aws-secrets-manager-credentials-provider/
MIT License
64 stars 42 forks source link

chore: Parallelize Tests #281

Closed rahulsom closed 10 months ago

rahulsom commented 10 months ago

This will use all available cores to run tests, and parallelize by all - suite/class/method. On machines with multiple cores, this will vastly improve test performance. These times are on my M1 MBP with 10 (8P + 2E) cores. They were reported by maven on running mvn verify.

I first ran mvn verify and ignored the time. Then I ran it thrice without this change, and thrice with this change.

All times in seconds.

Run 1 Run 2 Run 3 Average
Before 732 733 731 732
After 698 703 704 702
Savings 30
% 4

Testing done

All existing tests run

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue
chriskilding commented 10 months ago

Just a couple of things:

  1. Is this only meant to be for the unit tests, or is it meant to cover integration tests as well? (I suspect that due to the use of Docker within the integration tests, it would be difficult to parallelise those.)
  2. Have you compared whether concurrency (forks) or parallelism (threads) yields the better result?
  3. Is the useUnlimitedThreads argument required?
rahulsom commented 10 months ago

I'm abandoning this effort after this feedback -

https://github.com/jenkinsci/cloudbees-folder-plugin/pull/332