Merge pull request #8795 from guggero/itest-parallel
GitHub: increase itest parallelization to more tranches
This commit is contained in:
5 files changed
+64
-13
No files matched your search
@@ -22,6 +22,8 @@ defaults:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
BITCOIN_VERSION: "27"
|
BITCOIN_VERSION: "27"
|
||||||
|
|
||||||
|
TRANCHES: 16
|
||||||
|
|
||||||
# If you change this value, please change it in the following files as well:
|
# If you change this value, please change it in the following files as well:
|
||||||
# /.travis.yml
|
# /.travis.yml
|
||||||
@@ -275,7 +277,7 @@ jobs:
|
|||||||
run: ./scripts/install_bitcoind.sh $BITCOIN_VERSION
|
run: ./scripts/install_bitcoind.sh $BITCOIN_VERSION
|
||||||
|
|
||||||
- name: run ${{ matrix.name }}
|
- name: run ${{ matrix.name }}
|
||||||
run: make itest-parallel ${{ matrix.args }}
|
run: make itest-parallel tranches=${{ env.TRANCHES }} ${{ matrix.args }}
|
||||||
|
|
||||||
- name: Send coverage
|
- name: Send coverage
|
||||||
if: ${{ contains(matrix.args, 'cover=1') }}
|
if: ${{ contains(matrix.args, 'cover=1') }}
|
||||||
@@ -317,7 +319,7 @@ jobs:
|
|||||||
key-prefix: integration-test
|
key-prefix: integration-test
|
||||||
|
|
||||||
- name: run itest
|
- name: run itest
|
||||||
run: make itest-parallel windows=1
|
run: make itest-parallel tranches=${{ env.TRANCHES }} windows=1
|
||||||
|
|
||||||
- name: kill any remaining lnd processes
|
- name: kill any remaining lnd processes
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
@@ -361,7 +363,7 @@ jobs:
|
|||||||
mv bitcoin-${BITCOIN_VERSION}.0 /tmp/bitcoin
|
mv bitcoin-${BITCOIN_VERSION}.0 /tmp/bitcoin
|
||||||
|
|
||||||
- name: run itest
|
- name: run itest
|
||||||
run: PATH=$PATH:/tmp/bitcoin/bin make itest-parallel backend=bitcoind
|
run: PATH=$PATH:/tmp/bitcoin/bin make itest-parallel tranches=${{ env.TRANCHES }} backend=bitcoind
|
||||||
|
|
||||||
- name: Zip log files on failure
|
- name: Zip log files on failure
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
|
|||||||
+44
-9
@@ -649,16 +649,51 @@ func runPsbtChanFundingSingleStep(ht *lntest.HarnessTest, carol,
|
|||||||
|
|
||||||
// testSignPsbt tests that the SignPsbt RPC works correctly.
|
// testSignPsbt tests that the SignPsbt RPC works correctly.
|
||||||
func testSignPsbt(ht *lntest.HarnessTest) {
|
func testSignPsbt(ht *lntest.HarnessTest) {
|
||||||
runSignPsbtSegWitV0P2WKH(ht, ht.Alice)
|
psbtTestRunners := []struct {
|
||||||
runSignPsbtSegWitV0NP2WKH(ht, ht.Alice)
|
name string
|
||||||
runSignPsbtSegWitV1KeySpendBip86(ht, ht.Alice)
|
runner func(*lntest.HarnessTest, *node.HarnessNode)
|
||||||
runSignPsbtSegWitV1KeySpendRootHash(ht, ht.Alice)
|
}{
|
||||||
runSignPsbtSegWitV1ScriptSpend(ht, ht.Alice)
|
{
|
||||||
|
name: "sign psbt segwit v0 P2WPKH",
|
||||||
|
runner: runSignPsbtSegWitV0P2WKH,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "sign psbt segwit v0 P2WSH",
|
||||||
|
runner: runSignPsbtSegWitV0NP2WKH,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "sign psbt segwit v1 key spend bip86",
|
||||||
|
runner: runSignPsbtSegWitV1KeySpendBip86,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "sign psbt segwit v1 key spend root hash",
|
||||||
|
runner: runSignPsbtSegWitV1KeySpendRootHash,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "sign psbt segwit v1 script spend",
|
||||||
|
runner: runSignPsbtSegWitV1ScriptSpend,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// The above tests all make sure we can sign for keys
|
||||||
|
// that aren't in the wallet. But we also want to make
|
||||||
|
// sure we can fund and then sign PSBTs from our
|
||||||
|
// wallet.
|
||||||
|
name: "fund and sign psbt",
|
||||||
|
runner: runFundAndSignPsbt,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// The above tests all make sure we can sign for keys that aren't in
|
for _, tc := range psbtTestRunners {
|
||||||
// the wallet. But we also want to make sure we can fund and then sign
|
succeed := ht.Run(tc.name, func(t *testing.T) {
|
||||||
// PSBTs from our wallet.
|
st := ht.Subtest(t)
|
||||||
runFundAndSignPsbt(ht, ht.Alice)
|
tc.runner(st, st.Alice)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Abort the test if failed.
|
||||||
|
if !succeed {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// runSignPsbtSegWitV0P2WKH tests that the SignPsbt RPC works correctly for a
|
// runSignPsbtSegWitV0P2WKH tests that the SignPsbt RPC works correctly for a
|
||||||
|
|||||||
@@ -1778,6 +1778,11 @@ func (h *HarnessTest) MineBlocksAndAssertNumTxes(num uint32,
|
|||||||
h.Miner.AssertTxInBlock(blocks[0], txid)
|
h.Miner.AssertTxInBlock(blocks[0], txid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure the mempool has been updated.
|
||||||
|
for _, txid := range txids {
|
||||||
|
h.Miner.AssertTxNotInMempool(*txid)
|
||||||
|
}
|
||||||
|
|
||||||
// Finally, make sure all the active nodes are synced.
|
// Finally, make sure all the active nodes are synced.
|
||||||
bestBlock := blocks[len(blocks)-1]
|
bestBlock := blocks[len(blocks)-1]
|
||||||
h.AssertActiveNodesSyncedTo(bestBlock)
|
h.AssertActiveNodesSyncedTo(bestBlock)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const (
|
|||||||
|
|
||||||
// DefaultTimeout is a timeout that will be used for various wait
|
// DefaultTimeout is a timeout that will be used for various wait
|
||||||
// scenarios where no custom timeout value is defined.
|
// scenarios where no custom timeout value is defined.
|
||||||
DefaultTimeout = time.Second * 45
|
DefaultTimeout = time.Second * 60
|
||||||
|
|
||||||
// AsyncBenchmarkTimeout is the timeout used when running the async
|
// AsyncBenchmarkTimeout is the timeout used when running the async
|
||||||
// payments benchmark.
|
// payments benchmark.
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ func CraftSweepAllTx(feeRate, maxFeeRate chainfee.SatPerKWeight,
|
|||||||
// knows of. Otherwise, it may be possible for a new funding flow to
|
// knows of. Otherwise, it may be possible for a new funding flow to
|
||||||
// lock an output while we fetch the set of unspent witnesses.
|
// lock an output while we fetch the set of unspent witnesses.
|
||||||
err := coinSelectLocker.WithCoinSelectLock(func() error {
|
err := coinSelectLocker.WithCoinSelectLock(func() error {
|
||||||
|
log.Trace("[WithCoinSelectLock] entered the lock")
|
||||||
|
|
||||||
// Now that we can be sure that no other coin selection
|
// Now that we can be sure that no other coin selection
|
||||||
// operations are going on, we can grab a clean snapshot of the
|
// operations are going on, we can grab a clean snapshot of the
|
||||||
// current UTXO state of the wallet.
|
// current UTXO state of the wallet.
|
||||||
@@ -256,10 +258,15 @@ func CraftSweepAllTx(feeRate, maxFeeRate chainfee.SatPerKWeight,
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Trace("[WithCoinSelectLock] finished fetching UTXOs")
|
||||||
|
|
||||||
// We'll now lock each UTXO to ensure that other callers don't
|
// We'll now lock each UTXO to ensure that other callers don't
|
||||||
// attempt to use these UTXOs in transactions while we're
|
// attempt to use these UTXOs in transactions while we're
|
||||||
// crafting out sweep all transaction.
|
// crafting out sweep all transaction.
|
||||||
for _, utxo := range utxos {
|
for _, utxo := range utxos {
|
||||||
|
log.Tracef("[WithCoinSelectLock] leasing utxo: %v",
|
||||||
|
utxo.OutPoint)
|
||||||
|
|
||||||
_, _, _, err = outputLeaser.LeaseOutput(
|
_, _, _, err = outputLeaser.LeaseOutput(
|
||||||
chanfunding.LndInternalLockID, utxo.OutPoint,
|
chanfunding.LndInternalLockID, utxo.OutPoint,
|
||||||
chanfunding.DefaultLockDuration,
|
chanfunding.DefaultLockDuration,
|
||||||
@@ -269,6 +276,8 @@ func CraftSweepAllTx(feeRate, maxFeeRate chainfee.SatPerKWeight,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Trace("[WithCoinSelectLock] exited the lock")
|
||||||
|
|
||||||
allOutputs = append(allOutputs, utxos...)
|
allOutputs = append(allOutputs, utxos...)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in new issue
Block a user