fix: Make TxQ test resilient to new DefaultYes amendments#7038
fix: Make TxQ test resilient to new DefaultYes amendments#7038vvysokikh1 wants to merge 1 commit intodevelopfrom
Conversation
Close an empty ledger after initFee() in testMultiTxnPerAccount to shrink queue from the flag-ledger size (which depends on amendment count) to the deterministic 2*3=6. This makes the queue-full fee pressure assertion independent of how many DefaultYes amendments exist.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7038 +/- ##
=========================================
+ Coverage 82.0% 82.0% +0.1%
=========================================
Files 1010 1010
Lines 76304 75945 -359
Branches 7486 7382 -104
=========================================
- Hits 62535 62308 -227
+ Misses 13769 13637 -132 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the TxQ “multi tx per account” unit test to avoid depending on the variable number of DefaultYes amendments (which changes the flag-ledger pseudo-transaction count and thus the initial computed queue size).
Changes:
- After
initFee(...), closes an empty ledger to reset TxQ’s max queue size from the flag-ledger-derived value to the normal deterministic size. - Replaces expectations that used
initQueueMaxwith a fixed “normal” max queue size (6) for subsequent assertions intestMultiTxnPerAccount.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| initFee(env, 3, 2, 10, 200, 50); | ||
| // Close an empty ledger to shrink queue from the flag-ledger | ||
| // size to 2*3=6, independent of amendment count. | ||
| env.close(); | ||
| constexpr std::size_t normalMaxQueue = 6; | ||
| checkMetrics(*this, env, 0, normalMaxQueue, 0, 3); |
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
|
We recently merged a refactor to One-time setupIf you don't already have clang-tidy working in your env, on macOS: brew install llvm@21
# Follow brew's hint to put $(brew --prefix llvm@21)/bin on PATH so run-clang-tidy is found.Workflow on your branch (before merging develop)1. Grab the new git remote -v # should show 'upstream' among others; if not:
# git remote set-url upstream git@github.com:XRPLF/rippled.git
git fetch upstream
git checkout upstream/develop -- .clang-tidy2. Reconfigure conan/cmake so 3. Apply renames for the files modified in your PR: git diff --name-only $(git merge-base HEAD upstream/develop) HEAD \
| grep -E '\.(cpp|h|hpp|ipp)$' \
| xargs run-clang-tidy -p build -fix -allow-no-checks
# or -p .build, or whatever your build dir is called4. Build + test, then commit as a single dedicated commit: cmake --build build -j8
git commit -am "refactor: Align identifier naming with develop"5. Now merge develop: git merge upstream/developExtraRun clang-tidy once more after the merge to catch any stragglers introduced from develop's side: run-clang-tidy -p build -fix -allow-no-checks src tests
# or -p .build, or whatever your build dir is called |
Close an empty ledger after initFee() in testMultiTxnPerAccount to shrink queue from the flag-ledger size (which depends on amendment count) to the deterministic 2*3=6. This makes the queue-full fee pressure assertion independent of how many DefaultYes amendments exist.
High Level Overview of Change
Context of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)