Merge pull request #75 from sr-gi/pytest-timeout

Adds a timeout to Python tests that may wait forever
This commit is contained in:
Sergi Delgado Segura 2022-07-12 10:14:53 +02:00 committed by GitHub
commit 3175acafcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -10,6 +10,7 @@ python = "^3.9"
[tool.poetry.dev-dependencies]
pytest = "^7.1.2"
pytest-timeout = "^2.1.0"
pyln-testing = "^0.10.2"

View file

@ -77,6 +77,7 @@ def test_watchtower(node_factory, bitcoind, teosd):
assert penalty_txid in fund_txids
@pytest.mark.timeout(60)
def test_unreachable_watchtower(node_factory, bitcoind, teosd):
# Set the max retry interval to 1 sec so we know how much to wait for the next retry attempt
max_interval_time = 1