Skip to content

Conversation

fxamacker
Copy link
Member

@fxamacker fxamacker commented Oct 10, 2025

Closes #583

Currently, tests in CI are taking over an hour to run.

This PR reduces test duration by using parallelism: 64m → 31m

This change does not modify anything that affects the behavior of software on testnet or mainnet.


  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Currently, tests in CI are taking over an hour to run.

This commit reduces test duration by using parallelism.

This change does not modify anything that affects
the behavior of software on testnet or mainnet.
@fxamacker fxamacker self-assigned this Oct 10, 2025
@fxamacker fxamacker requested a review from turbolent as a code owner October 10, 2025 00:04
@fxamacker fxamacker changed the title Add parallelism to tests to reduce test duration Add parallelism to tests to reduce atree test duration (64m -> 33m) Oct 20, 2025
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice work!

Maybe it might make sense to have a set of quick unit tests that run in an even shorter time, and smoke tests that run periodically? Alternatively we might want to run the tests with a larger runner?

Some subtests were extracted in order to allow more tests
to run in parallel.

However, it can be tedious to review on GitHub because the
diff shows additions and substractions intermingled.

This commit moves the extracted subtests to the end of file,
to make the diff easier to read by having these additions separated
from the subtractions.

This commit also restores some previously extracted functions for
better Git readability.  Maybe we can address this in a separate PR.
@fxamacker fxamacker force-pushed the fxamacker/optimize-tests branch from 2d93ba2 to 13d5be1 Compare October 20, 2025 19:55
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Thank you for re-arranging the tests, the diff was much easier to review afterwards.

Nice work!

@fxamacker fxamacker changed the title Add parallelism to tests to reduce atree test duration (64m -> 33m) Add parallelism to tests to reduce atree test duration (64m -> 31m) Oct 20, 2025
@fxamacker
Copy link
Member Author

BTW, removing the -race flag from code coverage test (979b770) reduced its duration from ~33m -> 4m.

@fxamacker fxamacker merged commit a908076 into main Oct 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests in atree are taking over an hour to run on GitHub

2 participants