summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcli/tests/launch_services_with_xlibeufinbank.sh4
-rw-r--r--sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt2
2 files changed, 4 insertions, 2 deletions
diff --git a/cli/tests/launch_services_with_xlibeufinbank.sh b/cli/tests/launch_services_with_xlibeufinbank.sh
index b70b9f94..228b372b 100755
--- a/cli/tests/launch_services_with_xlibeufinbank.sh
+++ b/cli/tests/launch_services_with_xlibeufinbank.sh
@@ -45,7 +45,7 @@ libeufin-sandbox serve > sandbox.log 2>&1 &
SANDBOX_PID=$!
echo DONE
echo -n Wait for the bank...
-curl --max-time 2 --retry-connrefused --retry-delay 1 --retry 10 http://localhost:5000/ &> /dev/null
+curl --max-time 4 --retry-all-errors --retry-connrefused --retry-delay 1 --retry 10 http://localhost:5000/ &> /dev/null
echo DONE
echo -n Make one superuser at Nexus...
libeufin-nexus superuser test-user --password x
@@ -55,7 +55,7 @@ libeufin-nexus serve &> nexus.log &
NEXUS_PID=$!
echo DONE
echo -n Waiting for Nexus...
-curl --max-time 2 --retry-connrefused --retry-delay 1 --retry 10 http://localhost:5001/ &> /dev/null
+curl --max-time 4 --retry-all-errors --retry-connrefused --retry-delay 1 --retry 10 http://localhost:5001/ &> /dev/null
echo DONE
echo -n "Register the Sandbox account..."
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
index 237ae5f1..dc361a52 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt
@@ -228,6 +228,8 @@ fun wireTransfer(
}
// Adjusting the balances (acceptable debit conditions checked before).
+ debitAccount.refresh()
+ creditAccount.refresh()
// Debit:
val newDebitBalance = (BigDecimal(debitAccount.balance) - amountAsNumber).roundToTwoDigits()
debitAccount.balance = newDebitBalance.toPlainString() // FIXME: that's ignored!