Reduce some trade test wait times

Commit 2070e76 fixed the repeating dao sync bug, so don't need to
wait as long after generating a btc block.
This commit is contained in:
ghubstan 2020-12-29 14:12:55 -03:00
parent 6594d147d3
commit 206364de42
No known key found for this signature in database
GPG Key ID: E35592D6800A861E
2 changed files with 8 additions and 8 deletions

View File

@ -79,7 +79,7 @@ public class TakeBuyBTCOfferTest extends AbstractTradeTest {
// Cache the trade id for the other tests.
tradeId = trade.getTradeId();
genBtcBlocksThenWait(1, 2250);
genBtcBlocksThenWait(1, 1000);
assertEquals(0, getOpenOffersCount(aliceStubs, "buy", "usd"));
trade = getTrade(bobdaemon, trade.getTradeId());
@ -89,7 +89,7 @@ public class TakeBuyBTCOfferTest extends AbstractTradeTest {
verifyExpectedProtocolStatus(trade);
logTrade(log, testInfo, "Bob's view after taking offer and sending deposit", trade);
genBtcBlocksThenWait(1, 2250);
genBtcBlocksThenWait(1, 1000);
trade = getTrade(bobdaemon, trade.getTradeId());
EXPECTED_PROTOCOL_STATUS.setState(DEPOSIT_CONFIRMED_IN_BLOCK_CHAIN)
.setPhase(DEPOSIT_CONFIRMED)
@ -142,14 +142,14 @@ public class TakeBuyBTCOfferTest extends AbstractTradeTest {
@Test
@Order(4)
public void testAlicesKeepFunds(final TestInfo testInfo) {
genBtcBlocksThenWait(1, 2250);
genBtcBlocksThenWait(1, 1000);
var trade = getTrade(alicedaemon, tradeId);
logTrade(log, testInfo, "Alice's view before keeping funds", trade);
keepFunds(alicedaemon, tradeId);
genBtcBlocksThenWait(1, 2250);
genBtcBlocksThenWait(1, 1000);
trade = getTrade(alicedaemon, tradeId);
EXPECTED_PROTOCOL_STATUS.setState(BUYER_RECEIVED_PAYOUT_TX_PUBLISHED_MSG)
@ -157,7 +157,7 @@ public class TakeBuyBTCOfferTest extends AbstractTradeTest {
verifyExpectedProtocolStatus(trade);
logTrade(log, testInfo, "Alice's view after keeping funds", trade);
BtcBalanceInfo currentBalance = getBtcBalances(bobdaemon);
log.info("{} Alice's current available balance: {} BTC",
log.debug("{} Alice's current available balance: {} BTC",
testName(testInfo),
formatSatoshis(currentBalance.getAvailableBalance()));
}

View File

@ -90,7 +90,7 @@ public class TakeSellBTCOfferTest extends AbstractTradeTest {
logTrade(log, testInfo, "Bob's view after taking offer and sending deposit", trade);
genBtcBlocksThenWait(1, 2250);
genBtcBlocksThenWait(1, 1000);
trade = getTrade(bobdaemon, trade.getTradeId());
EXPECTED_PROTOCOL_STATUS.setState(DEPOSIT_CONFIRMED_IN_BLOCK_CHAIN)
.setPhase(DEPOSIT_CONFIRMED)
@ -143,7 +143,7 @@ public class TakeSellBTCOfferTest extends AbstractTradeTest {
@Test
@Order(4)
public void testBobsBtcWithdrawalToExternalAddress(final TestInfo testInfo) {
genBtcBlocksThenWait(1, 2250);
genBtcBlocksThenWait(1, 1000);
var trade = getTrade(bobdaemon, tradeId);
logTrade(log, testInfo, "Bob's view before withdrawing funds to external wallet", trade);
@ -151,7 +151,7 @@ public class TakeSellBTCOfferTest extends AbstractTradeTest {
String toAddress = bitcoinCli.getNewBtcAddress();
withdrawFunds(bobdaemon, tradeId, toAddress, WITHDRAWAL_TX_MEMO);
genBtcBlocksThenWait(1, 2250);
genBtcBlocksThenWait(1, 1000);
trade = getTrade(bobdaemon, tradeId);
EXPECTED_PROTOCOL_STATUS.setState(WITHDRAW_COMPLETED)