Skip to content

Run unit tests regardless of 'Supported' amendment status#5537

Merged
bthomee merged 6 commits intodevelopfrom
vvysokikh1/test_regardless_of_supported_status
Jul 16, 2025
Merged

Run unit tests regardless of 'Supported' amendment status#5537
bthomee merged 6 commits intodevelopfrom
vvysokikh1/test_regardless_of_supported_status

Conversation

@vvysokikh1
Copy link
Copy Markdown
Contributor

@vvysokikh1 vvysokikh1 commented Jul 7, 2025

High Level Overview of Change

Enable running tests regardless of 'Supported' amendment status.

For the review purpose, the functional change is in the first commit. Second commit only renames the function to better reflect its functionality

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

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)

@vvysokikh1 vvysokikh1 force-pushed the vvysokikh1/test_regardless_of_supported_status branch from c87dc91 to ff99038 Compare July 8, 2025 09:41
@vvysokikh1 vvysokikh1 force-pushed the vvysokikh1/test_regardless_of_supported_status branch from ff99038 to 0d7b2d2 Compare July 8, 2025 09:43
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.4%. Comparing base (c9135a6) to head (53bf7a7).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5537   +/-   ##
=======================================
  Coverage     78.4%   78.4%           
=======================================
  Files          816     816           
  Lines        71709   71709           
  Branches      8598    8595    -3     
=======================================
+ Hits         56215   56220    +5     
+ Misses       15494   15489    -5     

see 6 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vvysokikh1 vvysokikh1 requested a review from ximinez July 8, 2025 13:10
Copy link
Copy Markdown
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

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

Looks good, but I have a question.

Is there a way that I, as a developer, can exclude a given amendment from all existing tests? Say for example that I'm in the middle of some development task, and I create amendment X for it, and I make some non-amendment changes that I want to ensure don't break anything. Normally, I would Supported::no, run the tests, then maybe set it back to Supported::yes, and run them again. This can be done with individual tests trivially, but can it be done globally?

@vvysokikh1
Copy link
Copy Markdown
Contributor Author

Looks good, but I have a question.

Is there a way that I, as a developer, can exclude a given amendment from all existing tests? Say for example that I'm in the middle of some development task, and I create amendment X for it, and I make some non-amendment changes that I want to ensure don't break anything. Normally, I would Supported::no, run the tests, then maybe set it back to Supported::yes, and run them again. This can be done with individual tests trivially, but can it be done globally?

I'm not aware of this capability. If you see this as a blocker, I can think of the solution (maybe some compile time flags to be able to make such a specific build for testing?)

@vvysokikh1 vvysokikh1 added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jul 16, 2025
@bthomee bthomee enabled auto-merge (squash) July 16, 2025 11:07
@bthomee bthomee merged commit 8bfaa7f into develop Jul 16, 2025
3 checks passed
@bthomee bthomee deleted the vvysokikh1/test_regardless_of_supported_status branch July 16, 2025 11:47
@ximinez
Copy link
Copy Markdown
Collaborator

ximinez commented Jul 16, 2025

Is there a way that I, as a developer, can exclude a given amendment from all existing tests? [...]

I'm not aware of this capability. If you see this as a blocker, I can think of the solution (maybe some compile time flags to be able to make such a specific build for testing?)

I don't think it's a blocker, particularly since I thought of a way to do it.

Simply remove the amendment from the result in testable_amendments. e.g.

inline FeatureBitset
testable_amendments()
{
    static FeatureBitset const ids = [] {
[...]
    }();
    // TODO: Remove the modification before merging
    return ids - featureUnderConstruction;
}

Just make sure it's not merged that way.

@vvysokikh1
Copy link
Copy Markdown
Contributor Author

Is there a way that I, as a developer, can exclude a given amendment from all existing tests? [...]

I'm not aware of this capability. If you see this as a blocker, I can think of the solution (maybe some compile time flags to be able to make such a specific build for testing?)

I don't think it's a blocker, particularly since I thought of a way to do it.

Simply remove the amendment from the result in testable_amendments. e.g.

inline FeatureBitset
testable_amendments()
{
    static FeatureBitset const ids = [] {
[...]
    }();
    // TODO: Remove the modification before merging
    return ids - featureUnderConstruction;
}

Just make sure it's not merged that way.

Such thing should be quite visible during review, so I don't think this will be a problem

ximinez added a commit that referenced this pull request Jul 16, 2025
* XRPLF/develop:
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
ximinez added a commit that referenced this pull request Jul 21, 2025
…refactoring-1

* upstream/develop: (56 commits)
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  test: switch some unit tests to doctest (#5383)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-2

* ximinez/lending-refactoring-1: (57 commits)
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-3

* ximinez/lending-refactoring-2: (57 commits)
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-4

* ximinez/lending-refactoring-3: (61 commits)
  fixup! Rename Transactor preflight functions
  Rename Transactor preflight functions
  fixup! Make preflight1 and preflight2 private static Transactor functions
  Make preflight1 and preflight2 private static Transactor functions
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-4

* ximinez/lending-refactoring-3: (61 commits)
  fixup! Rename Transactor preflight functions
  Rename Transactor preflight functions
  fixup! Make preflight1 and preflight2 private static Transactor functions
  Make preflight1 and preflight2 private static Transactor functions
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  ...

Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
This was referenced Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants