feat: improve integration test times#588
Conversation
1dcceef to
fdafb9b
Compare
There was a problem hiding this comment.
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
PregeneratedKeysconfiguration to load and manage pre-shared keys from fixture JSON files - Injects pregenerated keys into storage before nodes start, enabling direct initialization with
init_runningto 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.
|
full integration test run went from 38-42mins to now 26mins |
jakmeier
left a comment
There was a problem hiding this comment.
Wow, great improvement! Thanks for connecting the pregenerated data with integration tests.
|
Impressive! |
This makes our integration tests more performant.
PregeneratedKeyswhich takes @jakmeier work on mpc fixture over for integration tests. This reduces our setup time by about 20s which is pretty good.test_signature_basicwent from 55-60s to now 30s from my measurement.