From b5d281dca8087b7264810b5da67d314209000b78 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 22 Feb 2023 09:26:47 +0200 Subject: [PATCH] lnwallet: run commitment tx tests in parallel --- lnwallet/transactions_test.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lnwallet/transactions_test.go b/lnwallet/transactions_test.go index b51a3f903..6ce0f527e 100644 --- a/lnwallet/transactions_test.go +++ b/lnwallet/transactions_test.go @@ -169,8 +169,9 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) { jsonFile: "test_vectors_legacy.json", }, { - name: "anchors", - chanType: channeldb.SingleFunderTweaklessBit | channeldb.AnchorOutputsBit, + name: "anchors", + chanType: channeldb.SingleFunderTweaklessBit | + channeldb.AnchorOutputsBit, jsonFile: "test_vectors_anchors.json", }, } @@ -186,15 +187,18 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) { err = json.Unmarshal(jsonText, &testCases) require.NoError(t, err) - t.Run(set.name, func(t *testing.T) { - for _, test := range testCases { - test := test + for _, test := range testCases { + test := test + name := fmt.Sprintf("%s-%s", set.name, test.Name) + + t.Run(name, func(t *testing.T) { + t.Parallel() t.Run(test.Name, func(t *testing.T) { testVectors(t, set.chanType, test) }) - } - }) + }) + } } }