diff --git a/fundingmanager_test.go b/fundingmanager_test.go index 5416304b8..fd58fa720 100644 --- a/fundingmanager_test.go +++ b/fundingmanager_test.go @@ -682,6 +682,8 @@ func assertErrorSent(t *testing.T, msgChan chan lnwire.Message) { func assertFundingMsgSent(t *testing.T, msgChan chan lnwire.Message, msgType string) lnwire.Message { + t.Helper() + var msg lnwire.Message select { case msg = <-msgChan: @@ -1037,6 +1039,8 @@ func assertHandleFundingLocked(t *testing.T, alice, bob *testNode) { } func TestFundingManagerNormalWorkflow(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1110,6 +1114,8 @@ func TestFundingManagerNormalWorkflow(t *testing.T) { } func TestFundingManagerRestartBehavior(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1248,6 +1254,8 @@ func TestFundingManagerRestartBehavior(t *testing.T) { // server to notify when the peer comes online, in case sending the // fundingLocked message fails the first time. func TestFundingManagerOfflinePeer(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1382,6 +1390,8 @@ func TestFundingManagerOfflinePeer(t *testing.T) { // will properly clean up a zombie reservation that times out after the // initFundingMsg has been handled. func TestFundingManagerPeerTimeoutAfterInitFunding(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1442,6 +1452,8 @@ func TestFundingManagerPeerTimeoutAfterInitFunding(t *testing.T) { // will properly clean up a zombie reservation that times out after the // fundingOpenMsg has been handled. func TestFundingManagerPeerTimeoutAfterFundingOpen(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1511,6 +1523,8 @@ func TestFundingManagerPeerTimeoutAfterFundingOpen(t *testing.T) { // will properly clean up a zombie reservation that times out after the // fundingAcceptMsg has been handled. func TestFundingManagerPeerTimeoutAfterFundingAccept(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1585,6 +1599,8 @@ func TestFundingManagerPeerTimeoutAfterFundingAccept(t *testing.T) { } func TestFundingManagerFundingTimeout(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1629,6 +1645,7 @@ func TestFundingManagerFundingTimeout(t *testing.T) { // TestFundingManagerFundingNotTimeoutInitiator checks that if the user was // the channel initiator, that it does not timeout when the lnd restarts. func TestFundingManagerFundingNotTimeoutInitiator(t *testing.T) { + t.Parallel() alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1697,6 +1714,8 @@ func TestFundingManagerFundingNotTimeoutInitiator(t *testing.T) { // continues to operate as expected in case we receive a duplicate fundingLocked // message. func TestFundingManagerReceiveFundingLockedTwice(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1789,6 +1808,8 @@ func TestFundingManagerReceiveFundingLockedTwice(t *testing.T) { // handles receiving a fundingLocked after the its own fundingLocked and channel // announcement is sent and gets restarted. func TestFundingManagerRestartAfterChanAnn(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1866,6 +1887,8 @@ func TestFundingManagerRestartAfterChanAnn(t *testing.T) { // fundingManager continues to operate as expected after it has received // fundingLocked and then gets restarted. func TestFundingManagerRestartAfterReceivingFundingLocked(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -1939,6 +1962,8 @@ func TestFundingManagerRestartAfterReceivingFundingLocked(t *testing.T) { // (a channel not supposed to be announced to the rest of the network), // the announcementSignatures nor the nodeAnnouncement messages are sent. func TestFundingManagerPrivateChannel(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -2041,6 +2066,8 @@ func TestFundingManagerPrivateChannel(t *testing.T) { // announcement signatures nor the node announcement messages are sent upon // restart. func TestFundingManagerPrivateRestart(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -2163,6 +2190,8 @@ func TestFundingManagerPrivateRestart(t *testing.T) { // TestFundingManagerCustomChannelParameters checks that custom requirements we // specify during the channel funding flow is preserved correcly on both sides. func TestFundingManagerCustomChannelParameters(t *testing.T) { + t.Parallel() + alice, bob := setupFundingManagers(t) defer tearDownFundingManagers(t, alice, bob) @@ -2391,6 +2420,8 @@ func TestFundingManagerCustomChannelParameters(t *testing.T) { // TestFundingManagerMaxPendingChannels checks that trying to open another // channel with the same peer when MaxPending channels are pending fails. func TestFundingManagerMaxPendingChannels(t *testing.T) { + t.Parallel() + const maxPending = 4 alice, bob := setupFundingManagers( @@ -2556,6 +2587,8 @@ func TestFundingManagerMaxPendingChannels(t *testing.T) { // TestFundingManagerRejectPush checks behaviour of 'rejectpush' // option, namely that non-zero incoming push amounts are disabled. func TestFundingManagerRejectPush(t *testing.T) { + t.Parallel() + // Enable 'rejectpush' option and initialize funding managers. alice, bob := setupFundingManagers( t, func(cfg *fundingConfig) {