Skip to content

fix(tests): mark cluster pools used by tests as in use - #3737

Merged
mkoura merged 1 commit into
masterfrom
pool_resource_races
Oct 5, 2026
Merged

mkoura merged 1 commit into
masterfrom
pool_resource_races

Conversation

@mkoura

@mkoura mkoura commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Tests that lock a pool can retire it and register it again. Tests that depend on a cluster pool must mark it as "in use", so the pool cannot be retired while they run.

  • test_pool_registration_used_vrf_key: mark the first cluster pool as "in use". While the pool is retired, its VRF key could be registered by the test's pool, and the re-registration of the retired pool would then fail.
  • test_unstable_stake_distribution: take a pool marked as "in use" instead of a hardcoded one.
  • test_pool_vote_delegation: make sure the "all pools" and the single pool stake distribution queries happen in the same epoch.
  • Leios EB tests: mark all cluster pools as "in use", as the tests rely on every pool being on the voting committee. Mark also the performance as "in use" for the certified EB test, so tests generating heavy load don't take the block space.

Tests that lock a pool can retire it and register it again. Tests
that depend on a cluster pool must mark it as "in use", so the pool
cannot be retired while they run.

- test_pool_registration_used_vrf_key: mark the first cluster pool as
  "in use". While the pool is retired, its VRF key could be registered
  by the test's pool, and the re-registration of the retired pool
  would then fail.
- test_unstable_stake_distribution: take a pool marked as "in use"
  instead of a hardcoded one.
- test_pool_vote_delegation: make sure the "all pools" and the single
  pool stake distribution queries happen in the same epoch.
- Leios EB tests: mark all cluster pools as "in use", as the tests
  rely on every pool being on the voting committee. Mark also the
  performance as "in use" for the certified EB test, so tests
  generating heavy load don't take the block space.
@mkoura
mkoura requested a review from saratomaz as a code owner October 5, 2026 15:23
@mkoura
mkoura requested a balanced review from Copilot and removed request for saratomaz October 5, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The resource fixtures correctly prevent conflicting pool operations, and no unresolved issues were found.

Review effort: Balanced
Findings: None

What changed in this PR

Prevents concurrent tests from retiring or overloading pools required by active tests.

Changes:

  • Marks required pools and performance capacity as in use.
  • Selects a protected pool for stake-distribution testing.
  • Keeps related stake-distribution queries within one epoch.
File Description
test_leios_blocks.py Protects Leios pools and performance capacity.
test_pools.py Protects pool1 and synchronizes distribution queries.
test_blocks.py Uses a pool marked as in use.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mkoura
mkoura merged commit aef9bfc into master Oct 5, 2026
4 checks passed
@mkoura
mkoura deleted the pool_resource_races branch October 5, 2026 15:29
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