aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-06 13:28:23 +0200
committerFlorian Dold <florian@dold.me>2023-09-06 13:28:23 +0200
commit013252efdeeb410b249ce33fc37ac90dbbf663c6 (patch)
treeaa166ac7ddce0c97d82494b0b64261438cd7acc9
parentb63937703ce1e269055497ee14ac90a28de2fc74 (diff)
harness: wait for withdrawal
-rw-r--r--packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts4
-rw-r--r--packages/taler-harness/src/integrationtests/test-payment-abort.ts8
-rw-r--r--packages/taler-harness/src/integrationtests/test-payment-transient.ts4
-rw-r--r--packages/taler-harness/src/integrationtests/test-stored-backups.ts4
4 files changed, 13 insertions, 7 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts
index e8f5a435a..2f79041d6 100644
--- a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts
+++ b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts
@@ -151,13 +151,15 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) {
// Withdraw digital cash into the wallet.
- await withdrawViaBankV2(t, {
+ const wres = await withdrawViaBankV2(t, {
walletClient,
bank,
exchange: faultyExchange,
amount: "TESTKUDOS:20",
});
+ await wres.withdrawalFinishedCond;
+
/**
* =========================================================================
* Create an order and let the wallet pay under a session ID
diff --git a/packages/taler-harness/src/integrationtests/test-payment-abort.ts b/packages/taler-harness/src/integrationtests/test-payment-abort.ts
index 3164bbaf3..fe7ecbcd7 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-abort.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-abort.ts
@@ -43,16 +43,18 @@ export async function runPaymentAbortTest(t: GlobalTestState) {
// Withdraw digital cash into the wallet.
- await withdrawViaBankV2(t, {
+ const wres = await withdrawViaBankV2(t, {
walletClient,
bank,
exchange: faultyExchange,
amount: "TESTKUDOS:20",
});
- const merchant = faultyMerchant;
+ await wres.withdrawalFinishedCond;
- const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
+ const merchantClient = new MerchantApiClient(
+ faultyMerchant.makeInstanceBaseUrl(),
+ );
let orderResp = await merchantClient.createOrder({
order: {
diff --git a/packages/taler-harness/src/integrationtests/test-payment-transient.ts b/packages/taler-harness/src/integrationtests/test-payment-transient.ts
index 46e57735f..1911b5e92 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-transient.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-transient.ts
@@ -50,14 +50,14 @@ export async function runPaymentTransientTest(t: GlobalTestState) {
// Withdraw digital cash into the wallet.
- await withdrawViaBankV2(t, {
+ const wres = await withdrawViaBankV2(t, {
walletClient,
bank,
exchange: faultyExchange,
amount: "TESTKUDOS:20",
});
- const merchant = faultyMerchant;
+ await wres.withdrawalFinishedCond;
let orderResp = await merchantClient.createOrder({
order: {
diff --git a/packages/taler-harness/src/integrationtests/test-stored-backups.ts b/packages/taler-harness/src/integrationtests/test-stored-backups.ts
index 831506d83..a3a5e6ca3 100644
--- a/packages/taler-harness/src/integrationtests/test-stored-backups.ts
+++ b/packages/taler-harness/src/integrationtests/test-stored-backups.ts
@@ -36,13 +36,15 @@ export async function runStoredBackupsTest(t: GlobalTestState) {
// Withdraw digital cash into the wallet.
- await withdrawViaBankV2(t, {
+ const wres = await withdrawViaBankV2(t, {
walletClient,
bank,
exchange,
amount: "TESTKUDOS:20",
});
+ await wres;
+
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
const sb1Resp = await walletClient.call(