aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts27
1 files changed, 20 insertions, 7 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts b/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts
index 72a3c3f0c..4cac5fe73 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts
@@ -17,7 +17,12 @@
/**
* Imports.
*/
-import { Duration, j2s, TalerCorebankApiClient } from "@gnu-taler/taler-util";
+import {
+ Duration,
+ j2s,
+ Logger,
+ TalerCorebankApiClient,
+} from "@gnu-taler/taler-util";
import {
createSyncCryptoApi,
EddsaKeyPairStrings,
@@ -39,6 +44,8 @@ import {
} from "../harness/harness.js";
import { EnvOptions, withdrawViaBankV3 } from "../harness/helpers.js";
+const logger = new Logger(`test-kyc-merchant-deposit.ts`);
+
interface KycTestEnv {
commonDb: DbInfo;
bankClient: TalerCorebankApiClient;
@@ -253,13 +260,19 @@ export async function runKycMerchantDepositTest(t: GlobalTestState) {
const kycStatusUrl = new URL("private/kyc", merchant.makeInstanceBaseUrl())
.href;
- const resp = await harnessHttpLib.fetch(kycStatusUrl);
-
- console.log(`mechant kyc status: ${resp.status}`);
- t.assertDeepEqual(resp.status, 200);
-
- console.log(j2s(await resp.json()));
+ while (1) {
+ const resp = await harnessHttpLib.fetch(kycStatusUrl);
+ logger.info(`mechant kyc status: ${resp.status}`);
+ if (resp.status === 200) {
+ console.log(j2s(await resp.json()));
+ break;
+ }
+ // Wait 500ms
+ await new Promise<void>((resolve) => {
+ setTimeout(() => resolve(), 500);
+ });
+ }
}
runKycMerchantDepositTest.suites = ["wallet"];