Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improv(gossip,accountsdb): improve test coverage on important methods #195

Merged
merged 7 commits into from
Jul 15, 2024

Conversation

0xNineteen
Copy link
Contributor

@0xNineteen 0xNineteen commented Jul 12, 2024

running kcov on the unit tests lead to finding important code paths we werent testing - this pr adds these units tests

unit tests added for the following:

GOSSIP

  • buildPushMessages with > MAX_BYTES_PER_PUSH [x]
  • handleBatchPongMessages never run - tests sending a pong request [x]
  • handleBatchPullRequest with valid indexes [x]
  • old prune messages [x]
  • pull request without contact info [x]
  • pull requests + push messages with a different shred_version [x]

ACCOUNTSDB

  • tests which load/index from a snapshot with more than one thread [x]
  • read account which is located in cache [x]
  • updateReference and removeReference with a normal linkedlist [x]
  • not testing indexRef [x]
  • putAssumeCapacity in swissmap not tested [x]

@0xNineteen 0xNineteen changed the base branch from main to 19/kcov July 12, 2024 20:33
@0xNineteen 0xNineteen self-assigned this Jul 12, 2024
@0xNineteen 0xNineteen marked this pull request as ready for review July 15, 2024 23:42
@0xNineteen 0xNineteen merged commit a57378f into 19/kcov Jul 15, 2024
@0xNineteen 0xNineteen deleted the 19/more_tests branch July 15, 2024 23:43
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.

None yet

2 participants