Skip to content

feat: improve integration test times#588

Merged
ChaoticTempest merged 1 commit intodevelopfrom
phuong/feat/improve-test-times
Nov 6, 2025
Merged

feat: improve integration test times#588
ChaoticTempest merged 1 commit intodevelopfrom
phuong/feat/improve-test-times

Conversation

@ChaoticTempest
Copy link
Copy Markdown
Contributor

This makes our integration tests more performant.

  • reduces the querying wait times since some were pretty big (sign had a 20s interval between queries).
  • add in PregeneratedKeys which takes @jakmeier work on mpc fixture over for integration tests. This reduces our setup time by about 20s which is pretty good.
  • our test_signature_basic went from 55-60s to now 30s from my measurement.

@ChaoticTempest ChaoticTempest force-pushed the phuong/feat/improve-test-times branch from 1dcceef to fdafb9b Compare November 6, 2025 01:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR optimizes integration test performance by introducing pregenerated keys to bypass the expensive MPC key generation protocol (20+ seconds). The changes add a new PregeneratedKeys enum with fixture data for 3 and 5 node configurations, inject these keys into storage during setup, and adjust various polling intervals to be more responsive.

  • Introduces PregeneratedKeys configuration to load and manage pre-shared keys from fixture JSON files
  • Injects pregenerated keys into storage before nodes start, enabling direct initialization with init_running to skip key generation
  • Reduces polling intervals across wait functions from 3-20 seconds to 0.5-1 second for faster test feedback

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
integration-tests/src/cluster/spawner.rs Adds PregeneratedKeys enum with fixture loading, key management methods, and integration into ClusterSpawner
integration-tests/src/lib.rs Injects pregenerated keys into storage during setup and uses init_running contract call to skip key generation when keys are present
integration-tests/src/cluster/mod.rs Reduces sleep duration from 3 seconds to 500ms in voting update
integration-tests/src/actions/wait_for.rs Reduces polling delays from 20 seconds to 500ms-1s and increases max retry attempts for faster test responsiveness
integration-tests/src/actions/wait.rs Reduces polling delays from 3-5 seconds to 500ms-1s across various wait functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChaoticTempest
Copy link
Copy Markdown
Contributor Author

full integration test run went from 38-42mins to now 26mins

Copy link
Copy Markdown
Contributor

@jakmeier jakmeier left a comment

Choose a reason for hiding this comment

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

Wow, great improvement! Thanks for connecting the pregenerated data with integration tests.

@ChaoticTempest ChaoticTempest merged commit e6102f3 into develop Nov 6, 2025
3 checks passed
@ChaoticTempest ChaoticTempest deleted the phuong/feat/improve-test-times branch November 6, 2025 19:04
@volovyks
Copy link
Copy Markdown
Contributor

volovyks commented Nov 7, 2025

Impressive!

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.

4 participants