mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
pytest: fix flake handling intest_restorefrompeer.
We tried to fix this flake before, but now it actually happened again it shows that
b5845afd43
wasn't correct.
```
# If this happens fast enough, connect fails with "disconnected
# during connection"
try:
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
except RpcError as err:
> assert "disconnected during connection" in err.error
E assert 'disconnected during connection' in {'code': 402, 'message': 'disconnected during connection'}
E + where {'code': 402, 'message': 'disconnected during connection'} = RpcError("RPC call failed: method: connect, payload: {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'host': 'localhost', 'port': 41849}, error: {'code': 402, 'message': 'disconnected during connection'}").error
tests/test_misc.py:2728: AssertionError
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
36b323e6d2
commit
6a7a0ea7d0
1 changed files with 1 additions and 1 deletions
|
@ -2725,7 +2725,7 @@ def test_restorefrompeer(node_factory, bitcoind):
|
||||||
try:
|
try:
|
||||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||||
except RpcError as err:
|
except RpcError as err:
|
||||||
assert "disconnected during connection" in err.error
|
assert "disconnected during connection" in err.error['message']
|
||||||
|
|
||||||
l1.daemon.wait_for_log('peer_in WIRE_YOUR_PEER_STORAGE')
|
l1.daemon.wait_for_log('peer_in WIRE_YOUR_PEER_STORAGE')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue