-
Notifications
You must be signed in to change notification settings - Fork 85
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
refactor(network): remove protobuf from network_manager test #2109
refactor(network): remove protobuf from network_manager test #2109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @asmaastarkware)
crates/papyrus_network/src/network_manager/test.rs
line 121 at r1 (raw file):
signatures: vec![], }; let data_bytes = Vec::<u8>::from(DataOrFin(Some(signed_header)));
I meant that you should not have headers at all here, just some random hardcoded vec
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2109 +/- ##
==========================================
- Coverage 68.41% 68.25% -0.17%
==========================================
Files 132 132
Lines 17605 17605
Branches 17605 17605
==========================================
- Hits 12045 12016 -29
- Misses 4229 4261 +32
+ Partials 1331 1328 -3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this 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, 1 unresolved discussion (waiting on @ShahakShama)
crates/papyrus_network/src/network_manager/test.rs
line 121 at r1 (raw file):
Previously, ShahakShama wrote…
I meant that you should not have headers at all here, just some random hardcoded vec
Done.
927e735
to
df6753b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @asmaastarkware)
crates/papyrus_network/src/network_manager/test.rs
line 95 at r2 (raw file):
} fn create_received_data_events_for_input(
You can still call it query, just keep it Vec
crates/papyrus_network/src/network_manager/test.rs
line 95 at r2 (raw file):
} fn create_received_data_events_for_input(
Add to the name of this function what it does
create_response_events_for_query_each_num_becomes_response
crates/papyrus_network/src/network_manager/test.rs
line 105 at r2 (raw file):
data: vec![data], outbound_session_id, peer_id: PeerId::random(),
Could you fix this on the way? you should receive peer_id from the caller (send_query. It has a peer_id argument)
crates/papyrus_network/src/network_manager/test.rs
line 257 at r2 (raw file):
.take(VEC.len()) .map(|(i, (result, _report_callback))| { let result = result.unwrap();
Add comment that this is how the mock swarm parses the query and sends responses to it
df6753b
to
000b74e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 3 unresolved discussions (waiting on @ShahakShama)
crates/papyrus_network/src/network_manager/test.rs
line 95 at r2 (raw file):
Previously, ShahakShama wrote…
Add to the name of this function what it does
create_response_events_for_query_each_num_becomes_response
Done.
crates/papyrus_network/src/network_manager/test.rs
line 105 at r2 (raw file):
Previously, ShahakShama wrote…
Could you fix this on the way? you should receive peer_id from the caller (send_query. It has a peer_id argument)
Done.
crates/papyrus_network/src/network_manager/test.rs
line 257 at r2 (raw file):
Previously, ShahakShama wrote…
Add comment that this is how the mock swarm parses the query and sends responses to it
Done.
000b74e
to
973b795
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @asmaastarkware)
This change is