From fe11ee54067bba11858ec009f7433d7a03c0c853 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 17 Nov 2018 15:28:46 +1030 Subject: [PATCH] pytest: make test_multirpc check that RPC commands complete. This was hanging sometimes in travis, but actually checking the result of the commands makes it *always* hang. We remove the waitinvoice which will not return. ZmnSCPxj points out that this behavior, introduced in ce0bd7abd303dba2fd6e862ff293dd7707e1f018, is a regression: it would be nice to be able to cancel a waitinvoice. But that fix is more complex, and will have to be another PR. This test will now hang, but it's OK: we're about to fix it! Signed-off-by: Rusty Russell --- tests/test_misc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_misc.py b/tests/test_misc.py index f9f2bd65a..3d1338aac 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -605,13 +605,14 @@ def test_multirpc(node_factory): 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": "waitinvoice", "params": ["foo"], "jsonrpc" : "2.0", "id": 8 }', + # FIXME: 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)) - l1.rpc._readobj(sock) + for i in commands: + l1.rpc._readobj(sock) sock.close()