test: fix basic funding integration test flakiness

This commit fixes some flakiness exhibited in the current basic funding
workflow tests. This test can fail occasionally in resource constrained
environment due to a race condition which arises after Alice learns of
the channel, but Bob is still waiting for Alice’s notification. As a
temporary fix, we now only check Alice’s state for the existence of the
channel.
This commit is contained in:
Olaoluwa Osuntokun
2016-09-06 12:04:08 -07:00
parent 803b66fd6d
commit d764493d25
2 changed files with 17 additions and 38 deletions

View File

@ -65,8 +65,11 @@ func testBasicChannelFunding(net *networkHarness, t *testing.T) {
// The channel should be listed in the peer information returned by
// both peers.
err = net.AssertChannelExists(ctxb, net.AliceClient, net.BobClient,
fundingChanPoint)
chanPoint := wire.OutPoint{
Hash: *fundingTxID,
Index: fundingChanPoint.OutputIndex,
}
err = net.AssertChannelExists(ctxb, net.AliceClient, &chanPoint)
if err != nil {
t.Fatalf("unable to assert channel existence: %v", err)
}