| 
    rippled
    
   | 
 


Classes | |
| struct | Event | 
| struct | Handler | 
Public Member Functions | |
| reduce_relay_test () | |
| void | run () override | 
| Runs the suite.   | |
| 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) | 
| 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)   | |
| 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) | 
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 | 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 878 of file reduce_relay_test.cpp.
      
  | 
  private | 
Definition at line 880 of file reduce_relay_test.cpp.
      
  | 
  private | 
Definition at line 881 of file reduce_relay_test.cpp.
      
  | 
  protected | 
| Enumerator | |
|---|---|
| On | |
| Off | |
| WaitReset | |
Definition at line 916 of file reduce_relay_test.cpp.
      
  | 
  protected | 
| Enumerator | |
|---|---|
| LinkDown | |
| PeerDisconnected | |
Definition at line 917 of file reduce_relay_test.cpp.
| ripple::test::reduce_relay_test::reduce_relay_test | ( | ) | 
Definition at line 1694 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 885 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Send squelch (if duration is set) or unsquelch (if duration not set)
Definition at line 899 of file reduce_relay_test.cpp.
      
  | 
  protected | 
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.
      
  | 
  protected | 
Definition at line 1116 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 1124 of file reduce_relay_test.cpp.
      
  | 
  protected | 
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 1136 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Receiving message from squelched peer too soon should not change the slot's state to Counting.
Definition at line 1147 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Receiving message from squelched peer should change the slot's state to Counting.
Definition at line 1158 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Propagate enough messages to generate one squelch event.
Definition at line 1168 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Send fewer message so that squelch event is not generated.
Definition at line 1209 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Receiving a message from new peer should change the slot's state to Counting.
Definition at line 1240 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Selected peer disconnects.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1252 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Selected peer stops relaying.
Should change the state to counting and unsquelch squelched peers.
Definition at line 1276 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Squelched peer disconnects.
Should not change the state to counting.
Definition at line 1301 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 1323 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 1457 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 1487 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 1549 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 1628 of file reduce_relay_test.cpp.
      
  | 
  overridevirtual | 
Runs the suite.
Implements beast::unit_test::suite.
Definition at line 1705 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 | 
      
  | 
  protected | 
Definition at line 1690 of file reduce_relay_test.cpp.
      
  | 
  protected | 
Definition at line 1691 of file reduce_relay_test.cpp.
      
  | 
  privateinherited | 
      
  | 
  privateinherited | 
      
  | 
  privateinherited | 
      
  | 
  inherited | 
      
  | 
  inherited |