mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
pytest: fix flakiness in test_channel_reenable.
In one case, the channel_update which we expected to activate the channel from l2 was suppressed as redundant. This is certainly valid, so just check the results. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
700a0d702d
commit
b379bec4e4
1 changed files with 5 additions and 6 deletions
|
@ -795,14 +795,13 @@ def test_channel_reenable(node_factory):
|
|||
wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True])
|
||||
|
||||
# Restart l2, will cause l1 to reconnect
|
||||
l2.restart()
|
||||
l2.stop()
|
||||
wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [False, False])
|
||||
l2.start()
|
||||
|
||||
# Now they should sync and re-establish again
|
||||
l1.daemon.wait_for_logs(['Received channel_update for channel \\d+:1:1.1.',
|
||||
'Received channel_update for channel \\d+:1:1.0.'])
|
||||
l2.daemon.wait_for_logs(['Received channel_update for channel \\d+:1:1.1.',
|
||||
'Received channel_update for channel \\d+:1:1.0.'])
|
||||
# Updates may be suppressed if redundant; just test results.
|
||||
wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True])
|
||||
wait_for(lambda: [c['active'] for c in l2.rpc.listchannels()['channels']] == [True, True])
|
||||
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
|
||||
|
|
Loading…
Add table
Reference in a new issue