lnd.xprv/lntest/itest
Matheus Degiovani 16a4687718
itest: Fix flakes when payments cause chan closure
This fixes itest flakes that happen when a payment is attempted that
ends up causing a channel closure.

completePaymentRequests() attempts to monitor the open channels after a
payment is attempted in order to identify that payment was actually
dispatched to a remote node before returning.

However, when the payment actually causes a channel closure (for
example, because the receiver sent an incorrect preimage) this logic
fails in that the channel will no longer the found in the list of open
channels. This could cause a flake when there was enough time for the
channel to close before performing the check.

One example of such a flaky test is failing_link.

This fixes the issue by also checking whether the total number of
channels was reduced, which indicates (assuming itest operations are
being executed serially) that one of the attempted payments affected at
least one channel.
2020-10-27 08:07:49 -03:00
..
lnd_channel_backup_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_forward_interceptor_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_macaroons_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_max_channel_size_test.go add new max channel size config option 2020-09-14 21:16:32 -05:00
lnd_mpp_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_multi-hop_htlc_local_chain_claim_test.go lntest: allow the main test files to be buildable w/o the rpctest build tag 2020-09-21 21:16:31 +02:00
lnd_multi-hop_htlc_local_timeout_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_multi-hop_htlc_receiver_chain_claim_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_multi-hop_htlc_remote_chain_claim_test.go lntest: allow the main test files to be buildable w/o the rpctest build tag 2020-09-21 21:16:31 +02:00
lnd_multi-hop_local_force_close_on_chain_htlc_timeout_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_multi-hop_remote_force_close_on_chain_htlc_timeout_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_multi-hop_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_multi-hop-error-propagation_test.go itest: fix code lint 2020-09-24 20:51:58 +08:00
lnd_multi-hop-payments_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_network_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_onchain_test.go lntest: allow the main test files to be buildable w/o the rpctest build tag 2020-09-21 21:16:31 +02:00
lnd_psbt_test.go itest: use new PSBT functions for funding flow 2020-10-03 10:34:56 +02:00
lnd_rest_api_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_send_multi_path_payment_test.go lntest: allow the main test files to be buildable w/o the rpctest build tag 2020-09-21 21:16:31 +02:00
lnd_signer_test.go lntest: allow the main test files to be buildable w/o the rpctest build tag 2020-09-21 21:16:31 +02:00
lnd_single_hop_invoice_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_test_list_off_test.go lntest: allow the main test files to be buildable w/o the rpctest build tag 2020-09-21 21:16:31 +02:00
lnd_test_list_on_test.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00
lnd_test.go itest: Fix flakes when payments cause chan closure 2020-10-27 08:07:49 -03:00
lnd_wumbo_channels_test.go lntest: allow the main test files to be buildable w/o the rpctest build tag 2020-09-21 21:16:31 +02:00
log_check_errors.sh itest: add error detection explanation 2020-05-08 13:40:29 +02:00
log_error_whitelist.txt itest: add error to whitelist 2020-10-08 20:39:11 +02:00
log_substitutions.txt itest: fix pattern for short_chan_id in err whitelist 2020-08-24 09:53:41 +02:00
test_harness.go lntest: fix most linter warnings, silence rest 2020-09-21 21:16:31 +02:00