Commit graph

339 commits

Author SHA1 Message Date
yyforyongyu
31aada65a4
itest: break down channel backup restore tests 2024-12-20 19:38:11 +08:00
yyforyongyu
7b1427a565
itest: break down payment failed tests 2024-12-20 19:38:11 +08:00
yyforyongyu
3319d0d983
itest: break down open channel fee policy 2024-12-20 19:38:11 +08:00
yyforyongyu
21c5d36812
itest: break down scid alias channel update tests 2024-12-20 19:38:10 +08:00
yyforyongyu
04a15039d7
itest: break all multihop test cases 2024-12-20 19:38:10 +08:00
yyforyongyu
a76ff79adc
itest: break down utxo selection funding tests 2024-12-20 19:38:10 +08:00
yyforyongyu
b1cb819f07
itest: break down channel restore commit types cases 2024-12-20 19:38:10 +08:00
yyforyongyu
5663edfc2f
itest: break remote signer into independent cases
So the test can run faster.
2024-12-20 19:38:10 +08:00
yyforyongyu
cca2364097
itest: optimize blocks mined in testGarbageCollectLinkNodes
There's no need to mine 80ish blocks here.
2024-12-20 19:38:10 +08:00
yyforyongyu
1950d89925
itest: document a flake found in SendToRoute 2024-12-20 19:38:10 +08:00
yyforyongyu
7e80b77535
itest: document a rare flake found in macOS 2024-12-20 19:38:09 +08:00
yyforyongyu
cfb5713cda
itest+lntest: fix flake in MPP-related tests 2024-12-20 19:38:09 +08:00
yyforyongyu
fb59669ae8
itest: document details about MPP-related tests
This is needed so we can have one place to fix the flakes found in the
MPP-related tests, which is fixed in the following commit.
2024-12-20 19:38:09 +08:00
yyforyongyu
4e85d86a2e
itest: fix flake in update_pending_open_channels 2024-12-20 19:38:09 +08:00
yyforyongyu
23edca8d19
itest: fix flake in testPrivateUpdateAlias 2024-12-20 19:38:08 +08:00
yyforyongyu
7c3564eeb6
itest: fix flake in runPsbtChanFundingWithNodes 2024-12-20 19:38:08 +08:00
yyforyongyu
7ceb9a4af5
lntest+itest: remove AssertNumActiveEdges
This is no longer needed since we don't have standby nodes, plus it's
causing panic in windows build due to `edge.Policy` being nil.
2024-12-20 19:38:08 +08:00
yyforyongyu
8f3100c984
itest: put mpp tests in one file 2024-12-20 19:38:08 +08:00
yyforyongyu
fee6b70519
itest: use ht.CreateSimpleNetwork whenever applicable
So we won't forget to assert the topology after opening a chain of
channels.
2024-12-20 19:38:08 +08:00
yyforyongyu
4eea2078fb
itest+routing: fix flake in runFeeEstimationTestCase
The test used 10s as the timeout value, which can easily cause a timeout
in a slow build so we increase it to 60s.
2024-12-20 19:38:08 +08:00
yyforyongyu
8b8f0c4eb4
itest: fix flake in testSwitchOfflineDelivery
The reconnection will happen automatically when the nodes have a
channel, so we just ensure the connection instead of reconnecting
directly.
2024-12-20 19:38:07 +08:00
yyforyongyu
66b35018b8
itest: fix flake in testRevokedCloseRetributionZeroValueRemoteOutput
We need to mine an empty block as the tx may already have entered the
mempool. This should be fixed once we start using the sweeper to handle
the justice tx.
2024-12-20 19:38:07 +08:00
yyforyongyu
c07162603d
itest: remove loop in wsTestCaseBiDirectionalSubscription
So we know which open channel operation failed.
2024-12-20 19:38:07 +08:00
yyforyongyu
782edde213
itest: fix and document flake in sweeping tests
We previously didn't see this issue because we always have nodes being
over-funded.
2024-12-20 19:38:07 +08:00
yyforyongyu
9f764c25f9
itest: flatten PSBT funding test cases
So it's easier to get the logs and debug.
2024-12-20 19:38:07 +08:00
yyforyongyu
762e59d78c
itest: fix flake for neutrino backend 2024-12-20 19:38:07 +08:00
yyforyongyu
3a45492398
itest: fix spawning temp miner 2024-12-20 19:38:07 +08:00
yyforyongyu
2a9b7ec536
itest: fix flake in testSendDirectPayment
This bug was hidden because we used standby nodes before, which always
have more-than-necessary wallet utxos.
2024-12-20 19:38:06 +08:00
yyforyongyu
e7310ff1b6
itest: fix testOpenChannelUpdateFeePolicy
This commit fixes a misuse of `ht.Subtest`, where the nodes should
always be created inside the subtest.
2024-12-20 19:38:06 +08:00
yyforyongyu
72f3f41d41
itest: remove unnecessary channel close and node shutdown
Since we don't have standby nodes anymore, we don't need to close the
channels when the test finishes. Previously we would do so to make sure
the standby nodes have a clean state for the next test case, which is no
longer relevant.
2024-12-20 19:38:06 +08:00
yyforyongyu
00772ae281
itest+lntest: remove standby nodes
This commit removes the standby nodes Alice and Bob.
2024-12-20 19:38:06 +08:00
yyforyongyu
11c9dd5ff2
itest: remove unused method setupFourHopNetwork 2024-12-20 19:38:05 +08:00
yyforyongyu
de8f14bed2
itest: remove the use of standby nodes
This commit removes the usage of the standby nodes and uses
`CreateSimpleNetwork` when applicable. Also introduces a helper method
`NewNodeWithCoins` to quickly start a node with funds.
2024-12-20 19:38:05 +08:00
yyforyongyu
3eda87fff9
itest: remove direct reference to stanby nodes
Prepares the upcoming refactor. We now never call `ht.Alice` directly,
instead, we always init `alice := ht.Alice` so it's easier to see how
they are removed in a following commit.
2024-12-20 19:38:05 +08:00
yyforyongyu
88bd0cb806
itest: shuffle test cases to even out blocks mined in tranches
This commit adds a new flag to shuffle all the test cases before running
them so tests which require lots of blocks to be mined are less likely
to be run in the same tranch.

The other benefit is this approach provides a more efficient way to
figure which tests are broken since all the differnet backends are
running different tranches in their builds, we can identify more failed
tests in one push.
2024-12-20 19:38:05 +08:00
yyforyongyu
2c27df6c30
itest: print num of blocks for debugging 2024-12-20 19:38:05 +08:00
yyforyongyu
a1bd8943db
lntest+itest: export DeriveFundingShim 2024-12-20 17:54:12 +08:00
yyforyongyu
c4a6abb14d
lntest+itest: remove the usage of ht.AssertActiveHtlcs
The method `AssertActiveHtlcs` is now removed due to it's easy to be
misused. To assert a given htlc, use `AssertOutgoingHTLCActive` and
`AssertIncomingHTLCActive` instead for ensuring the HTLC exists in the
right direction. Although often the case `AssertNumActiveHtlcs` would be
enough as it implicitly checks the forwarding behavior for an
intermediate node by asserting there are always num_payment*2 HTLCs.
2024-12-20 17:54:12 +08:00
yyforyongyu
36a87ad5f4
itest: assert payment status after sending 2024-12-20 17:54:12 +08:00
yyforyongyu
425877e745
itest: remove redundant block in multiple tests 2024-12-20 17:54:12 +08:00
yyforyongyu
9c0c373b7e
itest: flatten and fix testWatchtower 2024-12-20 17:54:12 +08:00
yyforyongyu
b7feeba008
itest+lntest: fix channel force close test
Also flatten the tests to make them easier to be maintained.
2024-12-20 17:54:12 +08:00
yyforyongyu
9d4a60d613
itest: remove redundant blocks in channel backup tests 2024-12-20 17:54:12 +08:00
yyforyongyu
a55408d4a1
itest: remove redudant block in testPsbtChanFundingWithUnstableUtxos 2024-12-20 17:54:11 +08:00
yyforyongyu
22b9350320
itest: remove redunant block mining in testChannelFundingWithUnstableUtxos 2024-12-20 17:54:11 +08:00
yyforyongyu
2494f1ed32
itest: remove redundant block mining in testFailingChannel 2024-12-20 17:54:11 +08:00
yyforyongyu
e1d5bbf171
itest: remove unnecessary force close 2024-12-20 17:54:11 +08:00
yyforyongyu
2adb356668
itest: rename file to reflect the tests 2024-12-20 17:54:11 +08:00
yyforyongyu
2f0256775e
itest: flatten testHtlcTimeoutResolverExtractPreimageRemote
Also remove unused code.
2024-12-20 17:54:11 +08:00
yyforyongyu
34951a6153
itest: flatten testHtlcTimeoutResolverExtractPreimageLocal
This commit simplfies the test since we only test the preimage
extraction logic in the htlc timeout resolver, there's no need to test
it for all different channel types as the resolver is made to be
oblivious about them.
2024-12-20 17:54:10 +08:00