Skip to content

gossip: Remove deprecated types from tests#11995

Open
efagerho wants to merge 1 commit intoanza-xyz:masterfrom
efagerho:remove_legacy_msgs_from_tests
Open

gossip: Remove deprecated types from tests#11995
efagerho wants to merge 1 commit intoanza-xyz:masterfrom
efagerho:remove_legacy_msgs_from_tests

Conversation

@efagerho
Copy link
Copy Markdown

@efagerho efagerho commented Apr 16, 2026

Problem

Currently some of our deprecated types are used in non-serialization tests.

Summary of Changes

Remove deprecated types from tests to simplify removal of said types.

@efagerho efagerho force-pushed the remove_legacy_msgs_from_tests branch from 3df04f7 to 6893ad2 Compare April 16, 2026 10:18
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.2%. Comparing base (85c24be) to head (6893ad2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11995   +/-   ##
=======================================
  Coverage    83.2%    83.2%           
=======================================
  Files         859      859           
  Lines      321697   321703    +6     
=======================================
+ Hits       267851   267872   +21     
+ Misses      53846    53831   -15     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@efagerho efagerho marked this pull request as ready for review April 16, 2026 10:54
@efagerho efagerho requested a review from a team as a code owner April 16, 2026 10:54
@efagerho efagerho requested a review from gregcusack April 16, 2026 16:07
Comment thread gossip/src/protocol.rs
Comment on lines 339 to 363
#[test]
fn test_max_accounts_hashes_with_push_messages() {
let mut rng = rand::rng();
for _ in 0..256 {
let accounts_hash = AccountsHashes::new_rand(&mut rng, None);
let crds_value =
CrdsValue::new(CrdsData::AccountsHashes(accounts_hash), &Keypair::new());
let message = Protocol::PushMessage(Pubkey::new_unique(), vec![crds_value]);
let socket = new_rand_socket_addr(&mut rng);
assert!(Packet::from_data(Some(&socket), message).is_ok());
}
}

#[test]
fn test_max_accounts_hashes_with_pull_responses() {
let mut rng = rand::rng();
for _ in 0..256 {
let accounts_hash = AccountsHashes::new_rand(&mut rng, None);
let crds_value =
CrdsValue::new(CrdsData::AccountsHashes(accounts_hash), &Keypair::new());
let response = Protocol::PullResponse(Pubkey::new_unique(), vec![crds_value]);
let socket = new_rand_socket_addr(&mut rng);
assert!(Packet::from_data(Some(&socket), response).is_ok());
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should we be getting rid of these as well?

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.

3 participants