Skip to content

Commit 4b283eb

Browse files
committed
pytest: fix flake in test_gossip_throttle
We can get the reply_short_channel_ids_end in the messages when we make a query: ``` 2024-11-29T07:39:28.8550652Z time_fast = time.time() - start_fast 2024-11-29T07:39:28.8551067Z assert time_fast < 2 2024-11-29T07:39:28.8551487Z out3 = [m for m in out3 if not m.startswith(b'0109')] 2024-11-29T07:39:28.8552158Z > assert set(out1) == set(out3) ... 2024-11-29T07:39:28.8675516Z E Extra items in the right set: 2024-11-29T07:39:28.8675887Z E b'010606226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f01' ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 3a0e3a1 commit 4b283eb

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
@@ -2121,14 +2121,15 @@ def test_gossip_throttle(node_factory, bitcoind, chainparams):
21212121
'--no-gossip',
21222122
'--hex',
21232123
'--network={}'.format(TEST_NETWORK),
2124-
'--max-messages={}'.format(expected),
2124+
'--max-messages={}'.format(expected + 1),
21252125
'{}@localhost:{}'.format(l1.info['id'], l1.port),
21262126
query],
21272127
check=True,
21282128
timeout=TIMEOUT, stdout=subprocess.PIPE).stdout.split()
21292129
time_fast = time.time() - start_fast
21302130
assert time_fast < 2
2131-
out3 = [m for m in out3 if not m.startswith(b'0109')]
2131+
# Ignore gossip_timestamp_filter and reply_short_channel_ids_end
2132+
out3 = [m for m in out3 if not m.startswith(b'0109') and not m.startswith(b'0106')]
21322133
assert set(out1) == set(out3)
21332134

21342135
start_slow = time.time()

0 commit comments

Comments
 (0)