|
rippled
|


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 * | this_suite () |
| Returns the "current" running suite. | |
Public Attributes | |
| log_os< char > | log |
| Logging output stream. | |
| testcase_t | testcase |
| Memberspace for declaring test cases. | |
Protected Types | |
| enum | State { On , Off , WaitReset } |
| enum | 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 | propagate_abort () |
Static Private Member Functions | |
| static suite ** | p_this_suite () |
Private Attributes | |
| bool | abort_ = false |
| bool | aborted_ = false |
| runner * | runner_ = nullptr |
Definition at line 1641 of file reduce_relay_test.cpp.
|
privateinherited |
Definition at line 866 of file reduce_relay_test.cpp.
|
privateinherited |
Definition at line 867 of file reduce_relay_test.cpp.
|
protectedinherited |
| Enumerator | |
|---|---|
| On | |
| Off | |
| WaitReset | |
Definition at line 900 of file reduce_relay_test.cpp.
|
protectedinherited |
| Enumerator | |
|---|---|
| LinkDown | |
| PeerDisconnected | |
Definition at line 901 of file reduce_relay_test.cpp.
|
private |
Definition at line 1644 of file reduce_relay_test.cpp.
|
overrideprivatevirtual |
Runs the suite.
Implements beast::unit_test::suite.
Definition at line 1650 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 871 of file reduce_relay_test.cpp.
|
staticprotectedinherited |
Send squelch (if duration is set) or unsquelch (if duration not set)
Definition at line 883 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 923 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1083 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1091 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 1103 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 1112 of file reduce_relay_test.cpp.
|
protectedinherited |
Receiving message from squelched peer should change the slot's state to Counting.
Definition at line 1123 of file reduce_relay_test.cpp.
|
protectedinherited |
Propagate enough messages to generate one squelch event.
Definition at line 1133 of file reduce_relay_test.cpp.
|
protectedinherited |
Send fewer message so that squelch event is not generated.
Definition at line 1168 of file reduce_relay_test.cpp.
|
protectedinherited |
Receiving a message from new peer should change the slot's state to Counting.
Definition at line 1197 of file reduce_relay_test.cpp.
|
protectedinherited |
Selected peer disconnects.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1209 of file reduce_relay_test.cpp.
|
protectedinherited |
Selected peer stops relaying.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1228 of file reduce_relay_test.cpp.
|
protectedinherited |
Squelched peer disconnects.
Should not change the state to counting.
Definition at line 1248 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1268 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1402 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1430 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1482 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1554 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. |
true if the test condition indicates success.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticprivateinherited |
|
privateinherited |
|
protectedinherited |
Definition at line 1608 of file reduce_relay_test.cpp.
|
protectedinherited |
Definition at line 1609 of file reduce_relay_test.cpp.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
inherited |
|
inherited |