mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
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 <rusty@rustcorp.com.au>
This commit is contained in:
parent
cab7e3e43a
commit
c8f9ea7bf7
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user