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

feat(tests_integration): one to many network config #2253

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yair-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@yair-starkware yair-starkware marked this pull request as ready for review November 24, 2024 15:28
@yair-starkware yair-starkware self-assigned this Nov 24, 2024
Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.70%. Comparing base (e3165c4) to head (7e53a63).
Report is 580 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2253      +/-   ##
==========================================
- Coverage   40.10%   36.70%   -3.40%     
==========================================
  Files          26      277     +251     
  Lines        1895    31757   +29862     
  Branches     1895    31757   +29862     
==========================================
+ Hits          760    11657   +10897     
- Misses       1100    19090   +17990     
- Partials       35     1010     +975     

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

Copy link
Contributor

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @alonh5, @eitanm-starkware, and @yair-starkware)


crates/papyrus_network/src/network_manager/test_utils.rs line 151 at r1 (raw file):

}

pub fn create_one_to_many_network_configs<const N: usize>() -> (NetworkConfig, Vec<NetworkConfig>) {

Rename to create_connected_network_configs


crates/papyrus_network/src/network_manager/test_utils.rs line 151 at r1 (raw file):

}

pub fn create_one_to_many_network_configs<const N: usize>() -> (NetworkConfig, Vec<NetworkConfig>) {

Consider returning [NetworkConfig; N] instead of vec


crates/papyrus_network/src/network_manager/test_utils.rs line 151 at r1 (raw file):

}

pub fn create_one_to_many_network_configs<const N: usize>() -> (NetworkConfig, Vec<NetworkConfig>) {

Return just a container of network configs instead (decrease N by 1). There's no need to split between the first one and the rest


crates/papyrus_network/src/network_manager/test_utils.rs line 180 at r1 (raw file):

}

pub fn create_network_config_connected_to_broadcast_channels<const N: usize, T>(

Revert the changes to this function. This function is used to check that messages were sent or to send messages, and for that we only need 2 peers

Copy link
Contributor Author

@yair-starkware yair-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @alonh5, @eitanm-starkware, and @ShahakShama)


crates/papyrus_network/src/network_manager/test_utils.rs line 151 at r1 (raw file):

Previously, ShahakShama wrote…

Rename to create_connected_network_configs

Done.


crates/papyrus_network/src/network_manager/test_utils.rs line 151 at r1 (raw file):

Previously, ShahakShama wrote…

Consider returning [NetworkConfig; N] instead of vec

It's hard because NetworkConfig doesn't implement Copy so you can't initialize an array


crates/papyrus_network/src/network_manager/test_utils.rs line 151 at r1 (raw file):

Previously, ShahakShama wrote…

Return just a container of network configs instead (decrease N by 1). There's no need to split between the first one and the rest

done


crates/papyrus_network/src/network_manager/test_utils.rs line 180 at r1 (raw file):

Previously, ShahakShama wrote…

Revert the changes to this function. This function is used to check that messages were sent or to send messages, and for that we only need 2 peers

I need to keep this check and also create another sequencer, so I need 3 peers

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