graceful with an idle peer disconnects it and completes
(node_factory, executor)
| 4392 | |
| 4393 | |
| 4394 | def test_graceful_idle_peer(node_factory, executor): |
| 4395 | """graceful with an idle peer disconnects it and completes""" |
| 4396 | l1, l2 = node_factory.line_graph(2) |
| 4397 | |
| 4398 | notifications = [] |
| 4399 | |
| 4400 | def run_graceful(): |
| 4401 | def capture(message, **kwargs): |
| 4402 | if message: |
| 4403 | notifications.append(message) |
| 4404 | with l1.rpc.notify(capture): |
| 4405 | return l1.rpc.graceful() |
| 4406 | |
| 4407 | fut = executor.submit(run_graceful) |
| 4408 | result = fut.result(TIMEOUT) |
| 4409 | |
| 4410 | assert result == {} |
| 4411 | assert any("peers still connected" in n for n in notifications) |
| 4412 | |
| 4413 | |
| 4414 | def test_graceful_htlc(node_factory, executor): |
nothing calls this directly
no test coverage detected