Documentation ¶
Index ¶
Constants ¶
const ( // MinerMempoolTimeout is the max time we will wait for a transaction // to propagate to the mining node's mempool. MinerMempoolTimeout = time.Minute // ChannelOpenTimeout is the max time we will wait before a channel to // be considered opened. ChannelOpenTimeout = time.Second * 30 // ChannelCloseTimeout is the max time we will wait before a channel is // considered closed. ChannelCloseTimeout = time.Second * 30 // DefaultTimeout is a timeout that will be used for various wait // scenarios where no custom timeout value is defined. DefaultTimeout = time.Second * 30 // AsyncBenchmarkTimeout is the timeout used when running the async // payments benchmark. AsyncBenchmarkTimeout = time.Minute * 2 // NodeStartTimeout is the timeout value when waiting for a node to // become fully started. NodeStartTimeout = time.Minute * 2 // SqliteBusyTimeout is the maximum time that a call to the sqlite db // will wait for the connection to become available. SqliteBusyTimeout = time.Second * 10 // PaymentTimeout is the timeout used when sending payments. PaymentTimeout = time.Second * 60 )
const PollInterval = 200 * time.Millisecond
PollInterval is a constant specifying a 200 ms interval.
Variables ¶
This section is empty.
Functions ¶
func Invariant ¶
Invariant is a helper test function that will wait for a timeout period of time, verifying that a statement remains true for the entire duration. This function is helpful as timing doesn't always line up well when running integration tests with several running lnd nodes. This function gives callers a way to assert that some property is maintained over a particular time frame.
func InvariantNoError ¶
InvariantNoError is a wrapper around Invariant that waits out the duration specified by timeout. It fails if the predicate ever returns an error during that time.
func NoError ¶
NoError is a wrapper around Predicate that waits for the passed method f to execute without error, and returns the last error encountered if this doesn't happen within the timeout.
func Predicate ¶
Predicate is a helper test function that will wait for a timeout period of time until the passed predicate returns true. This function is helpful as timing doesn't always line up well when running integration tests with several running lnd nodes. This function gives callers a way to assert that some property is upheld within a particular time frame.
TODO(yy): build a counter here so we know how many times we've tried the `pred`.
Types ¶
This section is empty.