|
xrpld
|


Public Member Functions | |
| template<class = void> | |
| void | operator() (Runner &r) |
| Invokes the test using the specified runner. | |
| template<class = void> | |
| void | pass () |
| Record a successful test condition. | |
| template<class F, class String> | |
| bool | except (F &&f, String const &reason) |
| template<class F> | |
| bool | except (F &&f) |
| template<class E, class F, class String> | |
| bool | except (F &&f, String const &reason) |
| template<class E, class F> | |
| bool | except (F &&f) |
| template<class F, class String> | |
| bool | unexcept (F &&f, String const &reason) |
| template<class F> | |
| bool | unexcept (F &&f) |
| std::string const & | arg () const |
| Return the argument associated with the runner. | |
| template<class Condition, class String> | |
| bool | unexpected (Condition shouldBeFalse, String const &reason) |
| template<class Condition> | |
| bool | unexpected (Condition shouldBeFalse) |
| template<class String> | |
| void | fail (String const &reason, char const *file, int line) |
| Record a failure. | |
| template<class = void> | |
| void | fail (std::string const &reason="") |
| template<class Condition> | |
| bool | expect (Condition const &shouldBeTrue) |
| Evaluate a test condition. | |
| template<class Condition, class String> | |
| bool | expect (Condition const &shouldBeTrue, String const &reason) |
| template<class Condition> | |
| bool | expect (Condition const &shouldBeTrue, char const *file, int line) |
| template<class Condition, class String> | |
| bool | expect (Condition const &shouldBeTrue, String const &reason, char const *file, int line) |
Static Public Member Functions | |
| static Suite * | thisSuite () |
| Returns the "current" running suite. | |
Public Attributes | |
| LogOs< char > | log |
| Logging output stream. | |
| TestcaseT | testcase |
| Memberspace for declaring test cases. | |
Protected Types | |
| enum class | State { On , Off , WaitReset } |
| enum class | EventType { LinkDown = 0 , PeerDisconnected = 1 } |
Protected Member Functions | |
| void | printPeers (std::string const &msg, std::uint16_t validator=0) |
| void | random (bool log) |
| Randomly brings the link between a validator and a peer down. | |
| bool | checkCounting (PublicKey const &validator, bool isCountingState) |
| void | doTest (std::string const &msg, bool log, std::function< void(bool)> f) |
| void | testInitialRound (bool log) |
| Initial counting round: three peers receive message "faster" then others. | |
| void | testPeerUnsquelchedTooSoon (bool log) |
| Receiving message from squelched peer too soon should not change the slot's state to Counting. | |
| void | testPeerUnsquelched (bool log) |
| Receiving message from squelched peer should change the slot's state to Counting. | |
| bool | propagateAndSquelch (bool log, bool purge=true, bool resetClock=true) |
| Propagate enough messages to generate one squelch event. | |
| bool | propagateNoSquelch (bool log, std::uint16_t nMessages, bool countingState, bool purge=true, bool resetClock=true) |
| Send fewer message so that squelch event is not generated. | |
| void | testNewPeer (bool log) |
| Receiving a message from new peer should change the slot's state to Counting. | |
| void | testSelectedPeerDisconnects (bool log) |
| Selected peer disconnects. | |
| void | testSelectedPeerStopsRelaying (bool log) |
| Selected peer stops relaying. | |
| void | testSquelchedPeerDisconnects (bool log) |
| Squelched peer disconnects. | |
| void | testConfig (bool log) |
| void | testBaseSquelchReady (bool log) |
| void | testInternalHashRouter (bool log) |
| void | testRandomSquelch (bool l) |
| void | testHandshake (bool log) |
Static Protected Member Functions | |
| static Peer::id_t | sendSquelch (PublicKey const &validator, PeerWPtr const &peerPtr, std::optional< std::uint32_t > duration) |
| Send squelch (if duration is set) or unsquelch (if duration not set). | |
Protected Attributes | |
| jtx::Env | env_ |
| Network | network_ |
Private Types | |
| using | Slot = reduce_relay::Slot<ManualClock> |
| using | id_t = Peer::id_t |
Private Member Functions | |
| void | testRandom (bool log) |
| void | run () override |
| Runs the suite. | |
| void | propagateAbort () const |
Static Private Member Functions | |
| static Suite ** | pThisSuite () |
Private Attributes | |
| bool | abort_ = false |
| bool | aborted_ = false |
| Runner * | runner_ = nullptr |
Definition at line 1654 of file reduce_relay_test.cpp.
|
privateinherited |
Definition at line 882 of file reduce_relay_test.cpp.
|
privateinherited |
Definition at line 883 of file reduce_relay_test.cpp.
|
strongprotectedinherited |
| Enumerator | |
|---|---|
| On | |
| Off | |
| WaitReset | |
Definition at line 916 of file reduce_relay_test.cpp.
|
strongprotectedinherited |
| Enumerator | |
|---|---|
| LinkDown | |
| PeerDisconnected | |
Definition at line 917 of file reduce_relay_test.cpp.
|
private |
Definition at line 1657 of file reduce_relay_test.cpp.
|
overrideprivatevirtual |
Runs the suite.
Implements beast::unit_test::Suite.
Definition at line 1663 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 887 of file reduce_relay_test.cpp.
|
staticprotectedinherited |
Send squelch (if duration is set) or unsquelch (if duration not set).
Definition at line 899 of file reduce_relay_test.cpp.
|
protectedinherited |
Randomly brings the link between a validator and a peer down.
Randomly disconnects a peer. Those events are generated one at a time.
Definition at line 939 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1099 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1107 of file reduce_relay_test.cpp.
|
protectedinherited |
Initial counting round: three peers receive message "faster" then others.
Once the message count for the three peers reaches threshold the rest of the peers are squelched and the slot for the given validator is in Selected state.
Definition at line 1119 of file reduce_relay_test.cpp.
|
protectedinherited |
Receiving message from squelched peer too soon should not change the slot's state to Counting.
Definition at line 1128 of file reduce_relay_test.cpp.
|
protectedinherited |
Receiving message from squelched peer should change the slot's state to Counting.
Definition at line 1139 of file reduce_relay_test.cpp.
|
protectedinherited |
Propagate enough messages to generate one squelch event.
Definition at line 1149 of file reduce_relay_test.cpp.
|
protectedinherited |
Send fewer message so that squelch event is not generated.
Definition at line 1183 of file reduce_relay_test.cpp.
|
protectedinherited |
Receiving a message from new peer should change the slot's state to Counting.
Definition at line 1212 of file reduce_relay_test.cpp.
|
protectedinherited |
Selected peer disconnects.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1224 of file reduce_relay_test.cpp.
|
protectedinherited |
Selected peer stops relaying.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1243 of file reduce_relay_test.cpp.
|
protectedinherited |
Squelched peer disconnects.
Should not change the state to counting.
Definition at line 1263 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1283 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1391 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1419 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1469 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1541 of file reduce_relay_test.cpp.
|
staticinherited |
|
inherited |
Invokes the test using the specified runner.
Data members are set up here instead of the constructor as a convenience to writing the derived class to avoid repetition of forwarded constructor arguments to the base. Normally this is called by the framework for you.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Evaluate a test condition.
This function provides improved logging by incorporating the file name and line number into the reported output on failure, as well as additional text specified by the caller.
| shouldBeTrue | The condition to test. The condition is evaluated in a boolean context. |
| reason | Optional added text to output on a failure. |
| file | The source code file where the test failed. |
| line | The source code line number where the test failed. |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticprivateinherited |
|
privateinherited |
|
protectedinherited |
Definition at line 1595 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1596 of file reduce_relay_test.cpp.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
inherited |