fix timing of marketplace tests

allow for a bit more time to withdraw funds
This commit is contained in:
Mark Spanbroek 2024-11-11 16:44:44 +01:00
parent 77a6d0fd13
commit 66bb2abc9a
No known key found for this signature in database
GPG Key ID: FBE3E9548D427C00
1 changed files with 11 additions and 5 deletions

View File

@ -85,7 +85,10 @@ twonodessuite "Marketplace", debug1 = false, debug2 = false:
check eventually (await token.balanceOf(account2)) - startBalanceHost >= (duration-5*60)*reward*nodes.u256
# Checking that client node receives some funds back that were not used for the host nodes
check eventually (await token.balanceOf(account1)) - clientBalanceBeforeFinished > 0
check eventually(
(await token.balanceOf(account1)) - clientBalanceBeforeFinished > 0,
timeout = 10*1000 # give client a bit of time to withdraw its funds
)
marketplacesuite "Marketplace payouts":
@ -161,10 +164,13 @@ marketplacesuite "Marketplace payouts":
endBalanceProvider > startBalanceProvider and
endBalanceProvider < startBalanceProvider + expiry.u256*reward
)
check eventually (
let endBalanceClient = (await token.balanceOf(client.ethAccount));
let endBalanceProvider = (await token.balanceOf(provider.ethAccount));
(startBalanceClient - endBalanceClient) == (endBalanceProvider - startBalanceProvider)
check eventually(
(
let endBalanceClient = (await token.balanceOf(client.ethAccount));
let endBalanceProvider = (await token.balanceOf(provider.ethAccount));
(startBalanceClient - endBalanceClient) == (endBalanceProvider - startBalanceProvider)
),
timeout = 10*1000 # give client a bit of time to withdraw its funds
)
await subscription.unsubscribe()