Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA: Run all CA package tests in parallel #7438

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Conversation

pgporada
Copy link
Member

The CA tests don't share any state and create their own individual CA implementations. We can safely run these tests in parallel within the CA package to shave at least a second off of unit test runs at the expense of additional CPU and memory usage.

Before:

$ ./t.sh -u -p ./ca -w
Running Unit Tests
ok      github.com/letsencrypt/boulder/ca       3.538s
SUCCESS

After:

$ ./t.sh -u -p ./ca -w
Running Unit Tests
ok      github.com/letsencrypt/boulder/ca       2.033s
SUCCESS

@pgporada pgporada requested a review from a team as a code owner April 17, 2024 16:21
aarongable
aarongable previously approved these changes Apr 17, 2024
Copy link
Contributor

@aarongable aarongable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and I bet we can go farther: do the same in crl_test.go and ocsp_test.go, and do the same inside the t.Run of any table-driven tests.

@aarongable aarongable merged commit c0ecabd into main Apr 17, 2024
12 checks passed
@aarongable aarongable deleted the parallelize-ca-tests branch April 17, 2024 23:01
pgporada added a commit that referenced this pull request Apr 25, 2024
[Previously](#7438) I had
made a change to run all CA tests in parallel, which was great, but I
failed to account for several table driven tests. By rebinding the
subtest's iterator to the lexical scope, each subtest can now run in
parallel.
vbaranovskiy-plesk pushed a commit to plesk/boulder that referenced this pull request May 30, 2024
The CA tests don't share any state and create their own individual CA
implementations. We can safely run these tests in parallel within the CA
package to shave at least a second off of unit test runs at the expense
of additional CPU and memory usage.
vbaranovskiy-plesk pushed a commit to plesk/boulder that referenced this pull request May 30, 2024
The CA tests don't share any state and create their own individual CA
implementations. We can safely run these tests in parallel within the CA
package to shave at least a second off of unit test runs at the expense
of additional CPU and memory usage.
vbaranovskiy-plesk pushed a commit to plesk/boulder that referenced this pull request May 30, 2024
[Previously](letsencrypt#7438) I had
made a change to run all CA tests in parallel, which was great, but I
failed to account for several table driven tests. By rebinding the
subtest's iterator to the lexical scope, each subtest can now run in
parallel.
AlinaADmi pushed a commit to plesk/boulder that referenced this pull request Jul 29, 2024
The CA tests don't share any state and create their own individual CA
implementations. We can safely run these tests in parallel within the CA
package to shave at least a second off of unit test runs at the expense
of additional CPU and memory usage.
AlinaADmi pushed a commit to plesk/boulder that referenced this pull request Jul 29, 2024
[Previously](letsencrypt#7438) I had
made a change to run all CA tests in parallel, which was great, but I
failed to account for several table driven tests. By rebinding the
subtest's iterator to the lexical scope, each subtest can now run in
parallel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants