From c8f9ea7bf7cf089aef7c1eba28b8033775285a19 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 15 Feb 2018 20:56:21 +1030 Subject: [PATCH] fixup: test_multirpc does not terminate. We need to set expiry, otherwise waitinvoice would take 1 hr, and we can't read once for every cmd, since each read may consume more than a single result, and we block. Signed-off-by: Rusty Russell --- tests/test_lightningd.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 81bb1fc3e..02e8cfcf4 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -3422,17 +3422,14 @@ class LightningDTests(BaseLightningDTests): b'{"id":4,"jsonrpc":"2.0","method":"listpeers","params":[]}', b'{"id":5,"jsonrpc":"2.0","method":"listpeers","params":[]}', b'{"id":6,"jsonrpc":"2.0","method":"listpeers","params":[]}', - b'{"method": "invoice", "params": [100, "foo", "foo"], "jsonrpc": "2.0", "id": 7 }', + b'{"method": "invoice", "params": [100, "foo", "foo", 1], "jsonrpc": "2.0", "id": 7 }', b'{"method": "waitinvoice", "params": ["foo"], "jsonrpc" : "2.0", "id": 8 }', b'{"method": "delinvoice", "params": ["foo", "unpaid"], "jsonrpc" : "2.0", "id": 9 }', ] sock.sendall(b'\n'.join(commands)) - # We only care to get back enough results, not their content - for _ in commands: - l1.rpc._readobj(sock) - #time.sleep(1) + l1.rpc._readobj(sock) sock.close() def test_cli(self):