-
Notifications
You must be signed in to change notification settings - Fork 648
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
fix(testloop): set epoch length in testloop #12664
base: master
Are you sure you want to change the base?
Conversation
@@ -503,6 +503,7 @@ impl TestLoopBuilder { | |||
let genesis = self.genesis.as_ref().unwrap(); | |||
let epoch_config_store = self.epoch_config_store.as_ref().unwrap(); | |||
let mut client_config = ClientConfig::test(true, 600, 2000, 4, is_archival, true, false); | |||
client_config.epoch_length = genesis.config.epoch_length; |
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.
actual fix
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12664 +/- ##
==========================================
- Coverage 70.50% 70.48% -0.02%
==========================================
Files 845 845
Lines 172257 172258 +1
Branches 172257 172258 +1
==========================================
- Hits 121442 121420 -22
- Misses 45717 45738 +21
- Partials 5098 5100 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
amazing 🎄
@@ -1146,8 +1144,7 @@ fn test_resharding_v3_yield_resume() { | |||
vec![account_in_left_child, account_in_right_child], | |||
ReceiptKind::PromiseYield, | |||
)) | |||
// TODO(resharding): test should work without changes to num_rpcs and track_all_shards | |||
.num_rpcs(0) | |||
// TODO(resharding): test should work without changes to track_all_shards | |||
.track_all_shards(true) |
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.
We still have the issue of track_all_shards
must be true
, right?
Some resharding tests failed if an RPC node was used to submit transactions.
It worked without RPC because
client0
was used by default, and it turned out this client was a chunk validator for the child shard after resharding.It did not work with RPC (or any client other than
client0
) because a transaction near epoch boundary was not forwarded toclient0
. It was not forwarded becauseconfig.epoch_length
was not properly set in testloop.It has default value
10
, while resharding tests use6
. That causedget_next_epoch_id_if_at_boundary
to return different result that expected. In consequence, transaction was not sent toclient0
, which was a chunk producer for next epoch.