mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
pytest: fix test_commando_stress
On fast machines, we don't get failures sometimes on commando commands.
(*But* we still got "New cmd replacing old" messages, which is how I
realized we weren't freeing them promptly, hence the previous fix).
```
# Should have exactly one discard msg from each discard
> nodes[0].daemon.wait_for_logs([r"New cmd from .*, replacing old"] * discards)
tests/test_plugin.py:2839:
...
> raise TimeoutError('Unable to find "{}" in logs.'.format(exs))
E TimeoutError: Unable to find "[]" in logs.
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
9aa9a8236f
commit
0a9a87ec10
@@ -2835,8 +2835,12 @@ def test_commando_stress(node_factory, executor):
|
||||
assert(e.error['message'] == "Invalid JSON")
|
||||
discards += 1
|
||||
|
||||
# Should have exactly one discard msg from each discard
|
||||
nodes[0].daemon.wait_for_logs([r"New cmd from .*, replacing old"] * discards)
|
||||
# Should have at least one discard msg from each failure (we can have
|
||||
# more, if they kept replacing each other, as happens!)
|
||||
if discards > 0:
|
||||
nodes[0].daemon.wait_for_logs([r"New cmd from .*, replacing old"] * discards)
|
||||
else:
|
||||
assert not nodes[0].daemon.is_in_log(r"New cmd from .*, replacing old")
|
||||
|
||||
|
||||
def test_commando_badrune(node_factory):
|
||||
|
||||
Reference in New Issue
Block a user