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

Run slow tests in parallel to improve overall test time #936

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

IamTheFij
Copy link
Contributor

This is one mitigation for #935 and cuts test runtime in half for me.

Note regarding the change to the expected results for the reverse sort: I'm not sure exactly why it was passing before. It's possible that the slice was modified by one of the earlier tests requiring the result to be not quite the proper reversed version. This patch makes sure the slices aren't modified and also fixes the expected result.

@IamTheFij
Copy link
Contributor Author

It's interesting that the tests when run on GitHub show next to no difference. This appears to be because the tests that rely on HTTP requests already run quickly here compared to when run on a local machine.

#19 106.9 --- PASS: TestCompareDigest (0.24s)
#19 106.9 === CONT  TestManifestMultiUpdatedPlatform
#19 106.9 --- PASS: TestManifest (0.29s)
#19 106.9 --- PASS: TestManifestVariant (0.65s)
#19 106.9 --- PASS: TestManifestMultiNotUpdatedPlatform (0.74s)
#19 106.9 --- PASS: TestManifestMultiUpdatedPlatform (0.60s)

Running those in parallel saved about 1.5 seconds here vs 30s on my local machine.

Copy link
Owner

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

Small nit otherwise LGTM!

pkg/registry/tags_test.go Show resolved Hide resolved
@crazy-max crazy-max merged commit 052a472 into crazy-max:master Sep 12, 2023
31 checks passed
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.

2 participants