test: fix lndrest on regtest (#2811)
* fix: lndrest on regtest * fix some race conditions on lndrest
This commit is contained in:
parent
61c71660b8
commit
1b9bb32ca0
6 changed files with 19 additions and 11 deletions
|
|
@ -102,6 +102,8 @@ async def test_node_payments(node_client, real_invoice, adminkey_headers_from):
|
|||
@pytest.mark.anyio
|
||||
async def test_channel_management(node_client):
|
||||
async def get_channels():
|
||||
# lndrest is slow / async with channel commands
|
||||
await asyncio.sleep(3)
|
||||
response = await node_client.get("/node/api/v1/channels")
|
||||
assert response.status_code == 200
|
||||
return parse_obj_as(list[NodeChannel], response.json())
|
||||
|
|
@ -134,6 +136,7 @@ async def test_channel_management(node_client):
|
|||
)
|
||||
assert response.status_code == 200
|
||||
created = ChannelPoint(**response.json())
|
||||
|
||||
data = await get_channels()
|
||||
assert any(
|
||||
channel.point == created and channel.state == ChannelState.PENDING
|
||||
|
|
@ -145,6 +148,8 @@ async def test_channel_management(node_client):
|
|||
# left for testing
|
||||
mine_blocks(5)
|
||||
|
||||
await asyncio.sleep(1)
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_peer_management(node_client):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue