Skip to content

test: attempt to remove flakiness from convergence tests#7370

Open
brice-stacks wants to merge 2 commits into
stacks-network:developfrom
brice-stacks:fix/flaky-convergence
Open

test: attempt to remove flakiness from convergence tests#7370
brice-stacks wants to merge 2 commits into
stacks-network:developfrom
brice-stacks:fix/flaky-convergence

Conversation

@brice-stacks

Copy link
Copy Markdown
Contributor
  • Increase timeout to 15 minutes
  • Reduce poll step to 10ms
  • Increase neighbor count for a denser graph (converging in fewer gossip rounds

- Increase timeout to 15 minutes
- Reduce poll step to 10ms
- Increase neighbor count for a denser graph (converging in fewer
  gossip rounds
@coveralls

coveralls commented Jun 30, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 28524034873

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.4%) to 86.088%

Details

  • Coverage increased (+0.4%) from the base build.
  • Patch coverage: 9 of 9 lines across 1 file are fully covered (100%).
  • 9072 coverage regressions across 132 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

9072 previously-covered lines in 132 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
stackslib/src/chainstate/burn/db/sortdb.rs 504 90.2%
stackslib/src/chainstate/stacks/db/blocks.rs 502 89.93%
stackslib/src/chainstate/nakamoto/mod.rs 436 84.75%
stackslib/src/config/mod.rs 421 69.34%
stackslib/src/net/mod.rs 310 78.23%
stackslib/src/chainstate/stacks/index/storage.rs 277 82.41%
clarity/src/vm/database/clarity_db.rs 268 82.11%
stackslib/src/chainstate/stacks/miner.rs 262 83.45%
stackslib/src/chainstate/stacks/db/transactions.rs 253 97.15%
stackslib/src/net/inv/epoch2x.rs 222 79.44%

Coverage Stats

Coverage Status
Relevant Lines: 226699
Covered Lines: 195161
Line Coverage: 86.09%
Coverage Strength: 19464402.54 hits per line

💛 - Coveralls

@federico-stacks federico-stacks 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.

LGTM. I just added a small check.

Also, heads-up: the license job in CI seems to be stuck.

let mut peer_configs = vec![];
let peer_count: usize = 15;
let neighbor_count: usize = 3;
let neighbor_count: usize = 8;

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.

Sanity check: I just noticed these three tests still use the original neighbor_count = 3. Was that intentional?

  • test_walk_ring_15_org_biased
  • test_walk_line_15_org_biased
  • test_walk_star_15_org_biased

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That was deliberate. I left the org-biased tests at 3 since that neighbor_count / 2 is used to set the soft_max_neighbors_per_org, so it has even more effect on those tests. But looking again, I just realized that those tests are the ones that are the most flaky, so maybe it is worth bumping that number up as well.

The main problem is that I don't have a good intuition for what is a reasonable number to use for these to get reasonable test coverage AND reasonable test duration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

what would you think about just hard-coding soft_max_neighbors_per_org = 1 for these tests, and then setting the neighbor_count to 8 like the rest?

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.

In this case we should also set soft_max_neighbors_per_host = 1

@brice-stacks

Copy link
Copy Markdown
Contributor Author

An alternative suggestion was made at today's sync that we instead just don't run these all the time, and only run them on release testing.

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.

3 participants