-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beat itest [3/3]: fix all itest flakes #9260
Open
yyforyongyu
wants to merge
32
commits into
yy-beat-itest-flakes
Choose a base branch
from
yy-beat-itest-optimize
base: yy-beat-itest-flakes
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8baa1a3
itest: optimize blocks mined in `testGarbageCollectLinkNodes`
yyforyongyu 8f4e260
itest: break remote signer into independent cases
yyforyongyu 6d1c3c2
itest: break down channel restore commit types cases
yyforyongyu a9dbd36
itest: break down utxo selection funding tests
yyforyongyu 6f26186
itest: break all multihop test cases
yyforyongyu 428829a
itest: break down scid alias channel update tests
yyforyongyu c8e6d74
itest: break down open channel fee policy
yyforyongyu 41ae04c
itest: break down payment failed tests
yyforyongyu b69e214
itest: break down channel backup restore tests
yyforyongyu c82610c
itest: break down wallet import account tests
yyforyongyu 6bef51d
itest: break down basic funding flow tests
yyforyongyu f42b108
itest: break down single hop send to route
yyforyongyu 80895be
itest: break down taproot tests
yyforyongyu c0ffd29
itest: break down channel fundmax tests
yyforyongyu 93765f2
itest: breakdown `testSendDirectPayment`
yyforyongyu b3f99c3
itest: further reduce block mined in tests
yyforyongyu 5326b1b
itest: track and skip flaky tests for windows
yyforyongyu fc7f282
lntest: increase node start timeout and payment benchmark timeout
yyforyongyu 5aec1ff
lntest: make sure policies are populated in `AssertChannelInGraph`
yyforyongyu 9aea852
workflows: use `btcd` for macOS
yyforyongyu 9a819b8
itest+lntest: add new method `FundNumCoins`
yyforyongyu ef54c92
lntest: limit the num of blocks mined in each test
yyforyongyu 72b0985
docs: update release notes
yyforyongyu b0a1f90
itest: add a prefix before appending a subtest case
yyforyongyu 0ac77d5
itest: even out num of tests per tranche
yyforyongyu 90e84c8
lntest: increase port timeout
yyforyongyu e39ba4d
lntest: add timeouts for windows
yyforyongyu 0a0ab90
lntest: properly handle shutdown error
yyforyongyu 2088e36
workflows: increase num of tranches to 16
yyforyongyu e31c412
lntest: make sure chain backend is synced to miner
yyforyongyu e1407ff
itest: document and fix wallet UTXO flake
yyforyongyu cc89b32
itest: fix flake in `testCoopCloseWithExternalDeliveryImpl`
yyforyongyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
//go:build integration | ||
|
||
package itest | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/lightningnetwork/lnd/fn/v2" | ||
"github.com/lightningnetwork/lnd/lntest" | ||
) | ||
|
||
// excludedTestsWindows is a list of tests that are flaky on Windows and should | ||
// be excluded from the test suite atm. | ||
// | ||
// TODO(yy): fix these tests and remove them from this list. | ||
var excludedTestsWindows = []string{ | ||
"batch channel funding", | ||
"zero conf channel open", | ||
"open channel with unstable utxos", | ||
"funding flow persistence", | ||
|
||
// Gives "channel link not found" error. | ||
"zero conf-channel policy update public zero conf", | ||
|
||
"listsweeps", | ||
"sweep htlcs", | ||
"sweep cpfp anchor incoming timeout", | ||
"payment succeeded htlc remote swept", | ||
"3rd party anchor spend", | ||
|
||
"send payment amp", | ||
"async payments benchmark", | ||
"async bidirectional payments", | ||
|
||
"multihop-htlc aggregation leased", | ||
"multihop-htlc aggregation leased zero conf", | ||
"multihop-htlc aggregation anchor", | ||
"multihop-htlc aggregation anchor zero conf", | ||
"multihop-htlc aggregation simple taproot", | ||
"multihop-htlc aggregation simple taproot zero conf", | ||
|
||
"channel force closure anchor", | ||
"channel force closure simple taproot", | ||
"channel backup restore force close", | ||
"wipe forwarding packages", | ||
|
||
"coop close with htlcs", | ||
"coop close with external delivery", | ||
|
||
"forward interceptor restart", | ||
"forward interceptor dedup htlcs", | ||
"invoice HTLC modifier basic", | ||
"lookup htlc resolution", | ||
|
||
"remote signer-taproot", | ||
"remote signer-account import", | ||
"remote signer-bump fee", | ||
"remote signer-funding input types", | ||
"remote signer-funding async payments taproot", | ||
"remote signer-funding async payments", | ||
"remote signer-random seed", | ||
"remote signer-verify msg", | ||
"remote signer-channel open", | ||
"remote signer-shared key", | ||
"remote signer-psbt", | ||
"remote signer-sign output raw", | ||
|
||
"on chain to blinded", | ||
"query blinded route", | ||
|
||
"data loss protection", | ||
} | ||
|
||
// filterWindowsFlakyTests filters out the flaky tests that are excluded from | ||
// the test suite on Windows. | ||
func filterWindowsFlakyTests() []*lntest.TestCase { | ||
// filteredTestCases is a substest of allTestCases that excludes the | ||
// above flaky tests. | ||
filteredTestCases := make([]*lntest.TestCase, 0, len(allTestCases)) | ||
|
||
// Create a set for the excluded test cases for fast lookup. | ||
excludedSet := fn.NewSet(excludedTestsWindows...) | ||
|
||
// Remove the tests from the excludedSet if it's found in the list of | ||
// all test cases. This is done to ensure the excluded tests are not | ||
// pointing to a test case that doesn't exist. | ||
for _, tc := range allTestCases { | ||
if excludedSet.Contains(tc.Name) { | ||
excludedSet.Remove(tc.Name) | ||
|
||
continue | ||
} | ||
|
||
filteredTestCases = append(filteredTestCases, tc) | ||
} | ||
|
||
// Exit early if all the excluded tests are found in allTestCases. | ||
if excludedSet.IsEmpty() { | ||
return filteredTestCases | ||
} | ||
|
||
// Otherwise, print out the tests that are not found in allTestCases. | ||
errStr := "\nThe following tests are not found, please make sure the " + | ||
"test names are correct in `excludedTestsWindows`.\n" | ||
for _, name := range excludedSet.ToSlice() { | ||
errStr += fmt.Sprintf("Test not found in test suite: %v\n", | ||
name) | ||
} | ||
|
||
panic(errStr) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uff, that's quite a list.... Do we have any idea what causes most of these to fail? Different behavior in network related code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few of them are related to graph syncing, then at some point I just stopped digging out why...instead I just repeat the pattern "test case failed -> add to the list" and hope we can figure out what happened there someday😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least we have a nice and tidy TODO list now :)