Skip to content

Commit

Permalink
chore: Parallelize Tests (#73)
Browse files Browse the repository at this point in the history
* chore: Parallelize Tests

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 |    21 |    21 |    22 |      21 |
| After  |    16 |    16 |    16 |      16 |
| Savings|       |       |       |       5 |
| %      |       |       |       |      24 |

* Move the forkCount definition into buildPlugin

Forcing the forkCount setting in the plugin pom will override the
value that a developer might set on their local computer based on the
configuration of that computer.

The configuration on ci.jenkins.io is known to have enough memory for
a JVM per core.  Use JVM per core on ci.jenkins.io for faster testing
and reduced costs.

---------

Co-authored-by: Name From Git-Plugin-Test <[email protected]>
Co-authored-by: Mark Waite <[email protected]>
  • Loading branch information
3 people authored Aug 5, 2023
1 parent 418e358 commit aa8b48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env groovy

/* `buildPlugin` step provided by: https://github.com/jenkins-infra/pipeline-library */
buildPlugin(useContainerAgent: true, configurations: [
buildPlugin(useContainerAgent: true, forkCount: '1C', configurations: [
[platform: 'linux', jdk: 17],
[platform: 'windows', jdk: 11],
])

0 comments on commit aa8b48e

Please sign in to comment.