-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[indexer-alt] Add tests for obj_info pruner #20809
base: xun/indexer-alt-obj-info-support-consensus-v2
Are you sure you want to change the base?
[indexer-alt] Add tests for obj_info pruner #20809
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
3933a24
to
9cedb9c
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.
tests look good to me, just a question about integration testing
9cedb9c
to
0d5e0a2
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.
Lgtm, some minor comments
@@ -216,11 +254,31 @@ mod tests { | |||
let result = obj_info.process(&Arc::new(checkpoint3)).unwrap(); | |||
assert_eq!(result.len(), 1); | |||
let processed = &result[0]; | |||
assert_eq!(processed.cp_sequence_number, 3); | |||
assert_eq!(processed.cp_sequence_number, 2); |
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.
noob q but how come this isn't 3, since the transfer object occurs in checkpoint 3 and qualifies to be inserted into values
/processed
?
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.
ah the checkpoint builder starts from 0
#[test] | ||
fn test_process_wrap() { | ||
#[tokio::test] | ||
async fn test_process_wrap() { |
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.
nice test
#[test] | ||
fn test_process_object_owned_object() { | ||
#[tokio::test] | ||
async fn test_process_object_owned_object() { |
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.
should we also add a pruning component to this test?
#[test] | ||
fn test_process_consensus_v2_object() { | ||
#[tokio::test] | ||
async fn test_process_consensus_v2_object() { |
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.
and same here - i think the result is the first entry gets pruned right
Description
Describe the changes or additions included in this PR.
Test plan
How did you test the new or updated feature?
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.