This repository was archived by the owner on Jul 2, 2024. It is now read-only.
File tree 1 file changed +7
-4
lines changed
src/test/groovy/cash/ird/walletd
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ class IridiumClientTest extends Specification {
41
41
42
42
void setup () {
43
43
wallet2 = sut2. createAddress()
44
+
45
+ def status = sut. getStatus()
46
+ waitForBlockHeightTotal(sut2, status. getBlockCount(). toInteger())
44
47
}
45
48
46
49
void cleanupSpec () {
@@ -536,14 +539,14 @@ class IridiumClientTest extends Specification {
536
539
private static void waitForBalance (IridiumAPI api , String address , long threshold ) {
537
540
while (api. getBalance(address). availableBalance < threshold) {
538
541
log. info(" Waiting for valid balance >=$threshold on wallet $address ... " )
539
- sleep(1000 )
542
+ sleep(5000 )
540
543
}
541
544
}
542
545
543
546
private static void waitForTransactionConfirmation (IridiumAPI api , String transactionHash ) {
544
547
while (api. getUnconfirmedTransactionHashes(). contains(transactionHash)) {
545
548
log. info(" Waiting for tx $transactionHash to get confirmed..." )
546
- sleep(1000 )
549
+ sleep(5000 )
547
550
}
548
551
}
549
552
@@ -552,15 +555,15 @@ class IridiumClientTest extends Specification {
552
555
def currentHeight
553
556
while ((currentHeight = api. getStatus(). knownBlockCount) && currentHeight < desiredHeight) {
554
557
log. info(" Waiting for blockHeight>$desiredHeight , current blockHeight=$currentHeight ... " )
555
- sleep(1000 )
558
+ sleep(5000 )
556
559
}
557
560
}
558
561
559
562
private static void waitForBlockHeightTotal (IridiumAPI api , int desiredHeight ) {
560
563
def currentHeight
561
564
while ((currentHeight = api. getStatus(). knownBlockCount) && currentHeight < desiredHeight) {
562
565
log. info(" Waiting for blockHeight>$desiredHeight , current blockHeight=$currentHeight ... " )
563
- sleep(1000 )
566
+ sleep(5000 )
564
567
}
565
568
}
566
569
You can’t perform that action at this time.
0 commit comments