mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
pytest: fix test_gossip_no_backtalk flake.
Because we expire cache every flush, in DEVELOPER mode that can happen in just over a second. If gossipd takes a while to process the gossip, this can mean we actually forget we received it from the peer. Easiest fix is to run this test in non-DEVELOPER mode. ``` # With DEVELOPER, this is long enough for gossip flush. time.sleep(2) > assert not l3.daemon.is_in_log(r'\[OUT\] 0100') E AssertionError: assert not '2022-06-30T06:00:31.031Z 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-connectd: [OUT] 0100294834e94aa2407ace65373c84c2a8056d67a6778c22bd43f03a9000d8a01f075c3996ab6c88951bd9805adbfde78292022d7514ffcec37d5e466ef5ebd235c87ffa8a8567904502cd65ae913dbb8014509f442a6e37b00fd59fa3a06811a4965f45df1612d3a32b2566001430cfec4346cc021bd0a1bf6a87417dbc29e0715f16c4f9dc5a01bff07368ba8f54cf9813c3fc8f9f8b8c8005da2a18021f322a9a168af8f82d9deba49ced51bb26a9abc001bbad314a15baccc87c685e9302533c2e86a7b9dfe90bd4cb6be5c2da375be8c4a535a63cacff0544957a34ca865fdb61f9198d19dfd990a0fcbf8de39fa2c0fc54435c16e74df2b49fe3b6e905d599000006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f0000670000010001022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d590266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c0351802e3bd38009866c9da8ec4aa99cc4ea9c6c0dd46df15c61ef0ce1f271291714e5702324266de8403b3ab157a09f1f784d587af61831c998c151bcc21bb74c2b2314b' ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
4633085ffd
commit
6cc4858847
1 changed files with 3 additions and 3 deletions
|
@ -1768,7 +1768,7 @@ def test_gossip_announce_unknown_block(node_factory, bitcoind):
|
|||
sync_blockheight(bitcoind, [l1])
|
||||
|
||||
|
||||
@pytest.mark.developer("gossip without DEVELOPER=1 is slow")
|
||||
@unittest.skipIf(DEVELOPER, "Developer gossip too fast!")
|
||||
def test_gossip_no_backtalk(node_factory):
|
||||
# l3 connects, gets gossip, but should *not* play it back.
|
||||
l1, l2, l3 = node_factory.get_nodes(3,
|
||||
|
@ -1781,8 +1781,8 @@ def test_gossip_no_backtalk(node_factory):
|
|||
r'\[IN\] 0102', r'\[IN\] 0102',
|
||||
r'\[IN\] 0101', r'\[IN\] 0101'])
|
||||
|
||||
# With DEVELOPER, this is long enough for gossip flush.
|
||||
time.sleep(2)
|
||||
# Will flush every 60 seconds, so definitely should by this time!
|
||||
time.sleep(90)
|
||||
assert not l3.daemon.is_in_log(r'\[OUT\] 0100')
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue