From 5d3756a735cf80ab8c4bac75617cd13681b829de Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Mon, 11 Nov 2024 16:44:44 +0100 Subject: [PATCH] fix timing of marketplace tests allow for a bit more time to withdraw funds --- tests/integration/testmarketplace.nim | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/integration/testmarketplace.nim b/tests/integration/testmarketplace.nim index 5e068791..6e62c58b 100644 --- a/tests/integration/testmarketplace.nim +++ b/tests/integration/testmarketplace.nim @@ -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()