-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add more UT for error cases simulated with sisl::flip #243
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## baseline_resync #243 +/- ##
===================================================
- Coverage 65.52% 64.60% -0.92%
===================================================
Files 33 33
Lines 2271 2407 +136
Branches 254 275 +21
===================================================
+ Hits 1488 1555 +67
- Misses 659 709 +50
- Partials 124 143 +19 ☔ View full report in Codecov by Sentry. |
ba51e6b
to
025d864
Compare
LOGINFO("TESTING: applying blobs for shard {} batch {}", shard.id, j); | ||
std::vector< ::flatbuffers::Offset< ResyncBlobData > > blob_entries; | ||
bool is_corrupted_batch = j < num_batches_per_shard && | ||
corrupt_dis(gen) <= unexpected_corrupted_batch_percentage; // Don't test on last batch |
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.
Why don't test on last batch?
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.
Thanks, for simplicity I'm not simulating resending the corrupted batch here. Instead, I'm just dropping and ignoring it - and dropping the last batch will cause issues to the following process.
I've added more comments here to explain the reason in the latest force-push.
025d864
to
3c4e572
Compare
3c4e572
to
d7ef51d
Compare
d7ef51d
to
3d84fb9
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
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
* Enhance SnapshotReceiveHandler UTs * Add test and flip for snapshot resync
Enhance existing class-level UT:
Introduce
sisl::flip
and simulate error cases in dynamic test