Skip to content

fix: Make TxQ test resilient to new DefaultYes amendments#7038

Open
vvysokikh1 wants to merge 1 commit intodevelopfrom
vvysokikh1/txq-test-amendment-resilience
Open

fix: Make TxQ test resilient to new DefaultYes amendments#7038
vvysokikh1 wants to merge 1 commit intodevelopfrom
vvysokikh1/txq-test-amendment-resilience

Conversation

@vvysokikh1
Copy link
Copy Markdown
Contributor

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

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

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.
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.0%. Comparing base (4dc923d) to head (d12a8d0).
⚠️ Report is 14 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            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     

see 169 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 initQueueMax with a fixed “normal” max queue size (6) for subsequent assertions in testMultiTxnPerAccount.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/test/app/TxQ_test.cpp
Comment on lines +1039 to +1044
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);
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@godexsoft
Copy link
Copy Markdown
Contributor

We recently merged a refactor to develop that enables clang-tidy's readability-identifier-naming. Your branch now has heavy conflicts that are largely mechanical. Below is a workflow that aligns your branch's naming with develop before merging, which should minimize the merge conflicts.

One-time setup

If 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 .clang-tidy from develop without pulling anything else. Sync your fork on GitHub first, then:

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-tidy

2. Reconfigure conan/cmake so compile_commands.json is fresh.

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 called

4. 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/develop

Extra

Run 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants