Skip to content

Commit

Permalink
test_lightningd.py: wait longer test_permfail for l2 to notice new bl…
Browse files Browse the repository at this point in the history
…ocks.

Reproduced this failure locally: l2 hadn't seen the block yet.  Timeout
was too aggressive.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed May 9, 2018
1 parent 2caeab5 commit c33bbb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_lightningd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,6 @@ def test_closing_different_fees(self):
wait_for(lambda: p.rpc.listpeers(l1.info['id'])['peers'][0]['channels'][0]['status'][1] == 'ONCHAIN:Tracking mutual close transaction')
l1.daemon.wait_for_logs([' to ONCHAIN'] * num_peers)

@flaky
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
def test_permfail(self):
l1, l2 = self.connect()
Expand Down Expand Up @@ -1583,7 +1582,7 @@ def test_permfail(self):
bitcoind.generate_block(95)
wait_forget_channels(l1)

wait_for(lambda: l2.rpc.listpeers(l1.info['id'])['peers'][0]['channels'][0]['status'] == ['ONCHAIN:Tracking our own unilateral close', 'ONCHAIN:All outputs resolved: waiting 5 more blocks before forgetting channel'], timeout=1)
wait_for(lambda: l2.rpc.listpeers(l1.info['id'])['peers'][0]['channels'][0]['status'] == ['ONCHAIN:Tracking our own unilateral close', 'ONCHAIN:All outputs resolved: waiting 5 more blocks before forgetting channel'])

# Now, 100 blocks l2 should be done.
bitcoind.generate_block(5)
Expand Down

0 comments on commit c33bbb2

Please sign in to comment.