From 3d964628f08fa1f6d87fdf3f6f8dfe374574a694 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Wed, 30 May 2018 12:51:44 +0200 Subject: [PATCH] fundingmanager test: check that error is sent on timeout --- fundingmanager_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fundingmanager_test.go b/fundingmanager_test.go index d74c2054f..a1f7686cd 100644 --- a/fundingmanager_test.go +++ b/fundingmanager_test.go @@ -1447,6 +1447,9 @@ func TestFundingManagerFundingTimeout(t *testing.T) { Height: fundingBroadcastHeight + 288, } + // Bob should have sent an Error message to Alice. + assertErrorSent(t, bob.msgChan) + // Should not be pending anymore. assertNumPendingChannelsBecomes(t, bob, 0) } @@ -1511,6 +1514,9 @@ func TestFundingManagerFundingNotTimeoutInitiator(t *testing.T) { // Since Alice was the initiator, the channel should not have timed out assertNumPendingChannelsRemains(t, alice, 1) + // Bob should have sent an Error message to Alice. + assertErrorSent(t, bob.msgChan) + // Since Bob was not the initiator, the channel should timeout assertNumPendingChannelsBecomes(t, bob, 0) }