Skip to content

Optimize some unit tests#1405

Merged
veluca93 merged 1 commit into
cms-dev:mainfrom
e-i-o:unit-test-optimization
Jun 11, 2025
Merged

Optimize some unit tests#1405
veluca93 merged 1 commit into
cms-dev:mainfrom
e-i-o:unit-test-optimization

Conversation

@prandla

@prandla prandla commented Jun 10, 2025

Copy link
Copy Markdown
Member
  • Some tests end up having to hash passwords. Add a tweak that allows setting the hashing difficulty to a lower value for the tests.
  • file_middleware_test had a really inefficient setUp() method, which matters more now that the FileCacher block size is 1MB.

This should save around 10 seconds in CI (according to codecov test timings).

Comment thread cmstestsuite/unit_tests/cmscommon/crypto_test.py Outdated
* Some tests end up having to hash passwords. Add a tweak that allows
  setting the hashing difficulty to a lower value for the tests.
* file_middleware_test had a really inefficient setUp() method,
  which matters more now that the FileCacher block size is 1MB.
@prandla prandla force-pushed the unit-test-optimization branch from 05c0bf6 to 4713255 Compare June 11, 2025 14:24
@veluca93 veluca93 merged commit f0a69e9 into cms-dev:main Jun 11, 2025
3 checks passed
@prandla prandla deleted the unit-test-optimization branch June 11, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants