Skip to content

kad: Randomize node count in get_providers_limit test#6008

Closed
GarmashAlex wants to merge 1 commit intolibp2p:masterfrom
GarmashAlex:hpp1
Closed

kad: Randomize node count in get_providers_limit test#6008
GarmashAlex wants to merge 1 commit intolibp2p:masterfrom
GarmashAlex:hpp1

Conversation

@GarmashAlex
Copy link

@GarmashAlex GarmashAlex commented Apr 24, 2025

Description

Resolves the TODO in the get_providers_limit test by replacing the fixed number
of nodes (12) with a randomized value between 3 and 20. This makes the test more
robust by testing with different network sizes on each run.

Also fixes a type inference issue with the const generic parameter N by explicitly
specifying the type when passing the prop function to QuickCheck.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@elenaf9
Copy link
Member

elenaf9 commented Apr 25, 2025

The test only uses 3 nodes, it doesn't make any sense to create more if they don't participate.

@elenaf9 elenaf9 closed this Apr 25, 2025
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