Skip to content

Commit be8e45b

Browse files
rustyrussellcdecker
authored andcommitted
pytest: fix flake in test_gossip.py::test_addgossip
We can miss it in both logs, so wait for it instead: ``` 2021-09-22T07:25:59.1582950Z > l3.rpc.addgossip(ann.split()[3]) 2021-09-22T07:25:59.1583911Z E AttributeError: 'NoneType' object has no attribute 'split' ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 79e09b9 commit be8e45b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_gossip.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,9 +1933,8 @@ def test_addgossip(node_factory):
19331933
# 0x0100 = channel_announcement
19341934
# 0x0102 = channel_update
19351935
# 0x0101 = node_announcement
1936-
ann = l1.daemon.is_in_log(r"\[OUT\] 0100.*")
1937-
if ann is None:
1938-
ann = l2.daemon.is_in_log(r"\[OUT\] 0100.*")
1936+
l1.daemon.logsearch_start = 0
1937+
ann = l1.daemon.wait_for_log(r"\[OUT\] 0100.*")
19391938

19401939
upd1 = l1.daemon.is_in_log(r"\[OUT\] 0102.*")
19411940
upd2 = l2.daemon.is_in_log(r"\[OUT\] 0102.*")

0 commit comments

Comments
 (0)