mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +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:
@@ -795,14 +795,13 @@ def test_channel_reenable(node_factory):
|
|||||||
wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True])
|
wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True])
|
||||||
|
|
||||||
# Restart l2, will cause l1 to reconnect
|
# 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
|
# Updates may be suppressed if redundant; just test results.
|
||||||
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.'])
|
|
||||||
wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True])
|
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")
|
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
|
||||||
|
|||||||
Reference in New Issue
Block a user