-
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
CI: fix more flakes, move itests to GitHub (except ARM itest) #5811
Changes from all commits
98061df
bedba02
6bc0862
1774934
c89637a
134be24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ var ( | |
"lndexec", itestLndBinary, "full path to lnd binary", | ||
) | ||
|
||
slowMineDelay = 50 * time.Millisecond | ||
slowMineDelay = 20 * time.Millisecond | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. re commit message: why does decreasing this value slow things down? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already had the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Going to update the commit message to make this more clear. |
||
) | ||
|
||
const ( | ||
|
@@ -199,7 +199,7 @@ func waitForNTxsInMempool(miner *rpcclient.Client, n int, | |
// mineBlocks mine 'num' of blocks and check that blocks are present in | ||
// node blockchain. numTxs should be set to the number of transactions | ||
// (excluding the coinbase) we expect to be included in the first mined block. | ||
func mineBlocks(t *harnessTest, net *lntest.NetworkHarness, | ||
func mineBlocksFast(t *harnessTest, net *lntest.NetworkHarness, | ||
num uint32, numTxs int) []*wire.MsgBlock { | ||
|
||
// If we expect transactions to be included in the blocks we'll mine, | ||
|
@@ -240,6 +240,19 @@ func mineBlocks(t *harnessTest, net *lntest.NetworkHarness, | |
return blocks | ||
} | ||
|
||
// mineBlocksSlow mines 'num' of blocks and checks that blocks are present in | ||
// the mining node's blockchain. numTxs should be set to the number of | ||
// transactions (excluding the coinbase) we expect to be included in the first | ||
// mined block. Between each mined block an artificial delay is introduced to | ||
// give all network participants time to catch up. | ||
// | ||
// NOTE: This function currently is just an alias for mineBlocksSlow. | ||
func mineBlocks(t *harnessTest, net *lntest.NetworkHarness, | ||
num uint32, numTxs int) []*wire.MsgBlock { | ||
|
||
return mineBlocksSlow(t, net, num, numTxs) | ||
} | ||
|
||
// mineBlocksSlow mines 'num' of blocks and checks that blocks are present in | ||
// the mining node's blockchain. numTxs should be set to the number of | ||
// transactions (excluding the coinbase) we expect to be included in the first | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -554,6 +554,8 @@ func NewMiner(baseLogDir, logFilename string, netParams *chaincfg.Params, | |
"--debuglevel=debug", | ||
"--logdir=" + baseLogDir, | ||
"--trickleinterval=100ms", | ||
// Don't disconnect if a reply takes too long. | ||
"--nostalldetect", | ||
} | ||
|
||
miner, err := rpctest.New(netParams, handler, args, btcdBinary) | ||
|
@@ -1597,6 +1599,15 @@ func (hn *HarnessNode) WaitForChannelPolicyUpdate(ctx context.Context, | |
select { | ||
// Send a watch request every second. | ||
case <-ticker.C: | ||
// Did the event can close in the meantime? We want to | ||
// avoid a "close of closed channel" panic since we're | ||
// re-using the same event chan for multiple requests. | ||
Comment on lines
+1602
to
+1604
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really understanding this comment? would this channel get closed when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's that if the channel has already been closed here, and we send in another request, it'll end up double closing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, exactly. |
||
select { | ||
case <-eventChan: | ||
return nil | ||
default: | ||
} | ||
|
||
hn.chanWatchRequests <- &chanWatchRequest{ | ||
chanPoint: op, | ||
eventChan: eventChan, | ||
|
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.
cy@ Travis 🤡