-
Notifications
You must be signed in to change notification settings - Fork 11
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
test(gateway): test RpcStateReader #449
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #449 +/- ##
==========================================
+ Coverage 83.13% 83.78% +0.65%
==========================================
Files 37 37
Lines 1737 1819 +82
Branches 1737 1819 +82
==========================================
+ Hits 1444 1524 +80
- Misses 214 220 +6
+ Partials 79 75 -4 ☔ 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.
Reviewed 5 of 6 files at r1, all commit messages.
Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions (waiting on @yair-starkware)
crates/gateway/src/rpc_state_reader_test.rs
line 30 at r1 (raw file):
"params": json!(params), })); dbg!(serde_json::to_string(&expected_response).unwrap());
needed?
Code quote:
dbg!(serde_json::to_string(&expected_response).unwrap());
crates/gateway/src/rpc_state_reader_test.rs
line 74 at r1 (raw file):
let block_info = client.get_block_info().unwrap(); // TODO(yair): Add partial_eq for BlockInfo and assert_eq the whole BlockInfo. assert_eq!(block_info.block_number, BlockNumber(100));
Can we move the assertion outside of the spawn_blocking
?
A bit more readable IMO to have all the assertions of the test last. Also, not sure how the a failure inside the spawn_blocking
is presented when running the test...
Code quote:
assert_eq!(block_info.block_number, BlockNumber(100));
4062595
to
654604e
Compare
654604e
to
f4af82a
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: 3 of 6 files reviewed, 2 unresolved discussions (waiting on @dafnamatsry)
crates/gateway/src/rpc_state_reader_test.rs
line 30 at r1 (raw file):
Previously, dafnamatsry wrote…
needed?
Removed
crates/gateway/src/rpc_state_reader_test.rs
line 74 at r1 (raw file):
Previously, dafnamatsry wrote…
Can we move the assertion outside of the
spawn_blocking
?
A bit more readable IMO to have all the assertions of the test last. Also, not sure how the a failure inside thespawn_blocking
is presented when running the test...
Done.
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 2 of 3 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @yair-starkware)
This change is