-
Notifications
You must be signed in to change notification settings - Fork 21
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
Improve test_raft_repl_dev UT #464
base: master
Are you sure you want to change the base?
Conversation
Previous code will add `ndevices` simulated drive into device list which make each replica go with one real drive and ndevices simulated drive. Those simulated drives are identified as FAST, meta/log were on them. Due to the very limited size of simulated drive, we can hit size limit in long running test. Fixing by honor input from hs_repl_test_common. After this fix, if only one drive passed in for a replica of test_raft_repl_dev, that drive will be used as FAST. All services will be started on that real drive. Signed-off-by: Xiaoxi Chen <[email protected]>
Signed-off-by: Xiaoxi Chen <[email protected]>
When using the write_on_leader() for long running tests, it is very possbile a leader switch happens during the test. Previous implementation the new leader(prvious follower) will not able to aware the role change and pick up to do more write. Signed-off-by: Xiaoxi Chen <[email protected]>
cca15ad
to
aa77d71
Compare
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 @@
## master #464 +/- ##
===========================================
+ Coverage 56.51% 68.16% +11.64%
===========================================
Files 108 109 +1
Lines 10300 10438 +138
Branches 1402 1400 -2
===========================================
+ Hits 5821 7115 +1294
+ Misses 3894 2645 -1249
- Partials 585 678 +93 ☔ View full report in Codecov by Sentry. |
I believe this PR will be very helpful for raft_repl_dev UT. pls proceed and finish this PR, thanks |
@@ -359,6 +359,14 @@ class HSTestHelper { | |||
// Fake restart, device list is unchanged. | |||
shutdown_homestore(false); | |||
std::this_thread::sleep_for(std::chrono::seconds{shutdown_delay_sec}); | |||
} else if (!m_token.devs_.empty()) { |
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.
now we have three use cases, priority-wise:
- UT specificly passed dev_list, if not there,
- --device_list from input, if not there,
- m_token.name_ which equeals to test_binary, name.
Can we put it as in comment at line: 178 (the start_homestore api), so that it can be friendly to us after a few month when we look back and don't need to scratch our head wondering why?
This PR has been idle for one month. Do we still want to merge this? |
this PR is very helpful to make repl_dev unit test stable in github CI. after this , we can enable @xiaoxichen pls go ahead and complete this PR when you get cycle. |
majar changes:
write_on_leader
.Other than UT
implement rollback for statemachine.