mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
pytest: Fix the flaky test_plugin_connected_hook test
It was a bit eager :-) Signed-off-by: Christian Decker <@cdecker>
This commit is contained in:
parent
eeecfc983c
commit
c96cc8a444
1 changed files with 6 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from fixtures import * # noqa: F401,F403
|
from fixtures import * # noqa: F401,F403
|
||||||
from lightning import RpcError, Millisatoshi
|
from lightning import RpcError, Millisatoshi
|
||||||
from utils import only_one
|
from utils import only_one, wait_for
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -169,8 +169,11 @@ def test_plugin_connected_hook(node_factory):
|
||||||
.format(l1.info['id']))
|
.format(l1.info['id']))
|
||||||
l3.daemon.wait_for_log(r"You are in reject list")
|
l3.daemon.wait_for_log(r"You are in reject list")
|
||||||
|
|
||||||
peer = l1.rpc.listpeers(l3.info['id'])['peers']
|
def check_disconnect():
|
||||||
assert(peer == [] or not peer[0]['connected'])
|
peers = l1.rpc.listpeers(l3.info['id'])['peers']
|
||||||
|
return peers == [] or not peers[0]['connected']
|
||||||
|
|
||||||
|
wait_for(check_disconnect)
|
||||||
|
|
||||||
|
|
||||||
def test_async_rpcmethod(node_factory, executor):
|
def test_async_rpcmethod(node_factory, executor):
|
||||||
|
|
Loading…
Add table
Reference in a new issue