Skip to content

Commit f5b6b6f

Browse files
committed
pytest: fix flake in test_gossip_force_broadcast_channel_msgs caused by ping timeout.
Signed-off-by: Rusty Russell <[email protected]>
1 parent 72a8fa2 commit f5b6b6f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_gossip.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,12 +2253,13 @@ def test_gossip_force_broadcast_channel_msgs(node_factory, bitcoind):
22532253
# It will send timestamp_filter. It should also send a channel_announcement, a
22542254
# channel_update, and a node_announcement, even though we said no gossip.
22552255
# It may or may not send:
2256-
# query_short_channel_ids, query_channel_range, a ping.
2256+
# query_short_channel_ids, query_channel_range, a ping (which we gossipwith replies to)
22572257
process = subprocess.Popen(['devtools/gossipwith',
22582258
'--no-gossip',
22592259
'--hex',
22602260
'--network={}'.format(TEST_NETWORK),
22612261
'--max-messages={}'.format(7),
2262+
'--handle-pings',
22622263
'--timeout-after=30',
22632264
'{}@localhost:{}'.format(l1.info['id'], l1.port)],
22642265
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -2308,7 +2309,7 @@ def test_gossip_force_broadcast_channel_msgs(node_factory, bitcoind):
23082309
'--hex',
23092310
'--network={}'.format(TEST_NETWORK),
23102311
'--max-messages={}'.format(10),
2311-
'--timeout-after={}'.format(120),
2312+
'--handle-pings',
23122313
'{}@localhost:{}'.format(l1.info['id'], l1.port)],
23132314
check=True,
23142315
timeout=120 + TIMEOUT, stdout=subprocess.PIPE).stdout.decode('utf-8').split()

0 commit comments

Comments
 (0)