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

tests(p2p): improve protocol test #918

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Jan 8, 2024

Motivation

The test for maximum line length in the P2P protocol is not correctly testing what it is supposed to. Currently, it checks whether the protocol is disconnecting, which happens even if the payload is smaller than the max length. Also, the size of the test payload was way larger than the actual limit. We should test the edges, 1 byte short.

Acceptance Criteria

  • Improve test_invalid_size().

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco added the tests label Jan 8, 2024
@glevco glevco self-assigned this Jan 8, 2024
@glevco glevco marked this pull request as ready for review January 8, 2024 17:40
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (126bae3) 85.31% compared to head (d02b3f4) 85.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #918      +/-   ##
==========================================
- Coverage   85.31%   85.30%   -0.01%     
==========================================
  Files         284      284              
  Lines       22330    22330              
  Branches     3367     3367              
==========================================
- Hits        19051    19049       -2     
- Misses       2604     2610       +6     
+ Partials      675      671       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glevco glevco merged commit abbd054 into master Jan 8, 2024
9 checks passed
@glevco glevco deleted the tests/improve-protocol-test branch January 8, 2024 21:25
@jansegre jansegre mentioned this pull request Jan 30, 2024
2 tasks
@jansegre jansegre mentioned this pull request Feb 26, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants