Files
rippled/src/test
Pratik Mankawde 58d4e48679 fix(telemetry): restore injectCurrentContextToProtobuf decl; re-parent open/establish spans under round; correct childSpan names
Post-review fixes for the SpanGuard scope-leak change:
- SpanGuard.h: restore the injectCurrentContextToProtobuf real-class
  declaration, its #else no-op stub, and the protocol::TraceContext
  forward-declaration dropped during the 3->4 union merge (compile break).
- Re-parent consensus.phase.open and consensus.establish under the round
  span via a new RCLConsensus::Adaptor::roundSpanContext() accessor: the
  round span is now detached, so ambient parenting no longer works; the
  phase spans link explicitly to the captured round context. csf::Peer
  gains a matching no-op accessor so the generic engine still compiles.
- Switch five childSpan(op::X, ctx) sites to the full consensus::span::X
  constants: childSpan(name, ctx) takes the name verbatim, so the suffix-
  only op:: constants emitted short, non-dotted span names.
- TestTelemetry mock: add getConsensusTraceStrategy() override (base pure
  virtual introduced on this branch) so the mock is not abstract.
- validate(): rewrite the trace_context comment to drop attack-surface
  framing and the PR-discussion reference.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 15:25:15 +01:00
..

Unit Tests

Running Tests

Unit tests are bundled in the xrpld executable and can be executed using the --unittest parameter. Without any arguments to this option, all non-manual unit tests will be executed. If you want to run one or more manual tests, you must specify it by suite or full-name (e.g. xrpl.app.NoRippleCheckLimits or just NoRippleCheckLimits).

More than one suite or group of suites can be specified as a comma separated list via the argument. For example, --unittest=beast,OversizeMeta will run all suites in the beast library (root identifier) as well as the test suite named OversizeMeta). All name matches are case sensitive.

Tests can be executed in parallel using several child processes by specifying the --unittest-jobs=N parameter. The default behavior is to execute serially using a single process.

The order that suites are executed is determined by the suite priority that is optionally specified when the suite is declared in the code with one of the BEAST_DEFINE_TESTSUITE macros. By default, suites have a priority of 0, and other suites can choose to declare an integer priority value to make themselves execute before or after other suites based on their specified priority value.

By default, the framework will emit the name of each testcase/testsuite when it starts and any messages sent to the suite log stream. The --quiet option will suppress both types of messages, but combining --unittest-log with --quiet will cause log messages to be emitted while suite/case names are suppressed.