[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 01/02: only shut down once
From: |
gnunet |
Subject: |
[taler-wallet-core] 01/02: only shut down once |
Date: |
Fri, 07 Aug 2020 08:06:40 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
commit 32755f547547ddede4fd69951bdee0beda91c4f7
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Fri Aug 7 11:33:48 2020 +0530
only shut down once
---
packages/taler-integrationtests/src/harness.ts | 10 +++++++---
packages/taler-integrationtests/src/merchantApiTypes.ts | 3 +++
packages/taler-integrationtests/src/test-payment-multiple.ts | 2 +-
packages/taler-integrationtests/src/test-payment.ts | 2 +-
packages/taler-integrationtests/src/test-withdrawal.ts | 2 +-
5 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/packages/taler-integrationtests/src/harness.ts
b/packages/taler-integrationtests/src/harness.ts
index ec25ca25..3a652e29 100644
--- a/packages/taler-integrationtests/src/harness.ts
+++ b/packages/taler-integrationtests/src/harness.ts
@@ -220,6 +220,7 @@ export class GlobalTestState {
testDir: string;
procs: ProcessWrapper[];
servers: http.Server[];
+ inShutdown: false;
constructor(params: GlobalTestParams) {
this.testDir = params.testDir;
this.procs = [];
@@ -307,8 +308,11 @@ export class GlobalTestState {
return procWrap;
}
- async terminate(): Promise<void> {
- console.log("terminating");
+ async shutdown(): Promise<void> {
+ if (this.inShutdown) {
+ return;
+ }
+ console.log("shutting down");
for (const s of this.servers) {
s.close();
s.removeAllListeners();
@@ -892,7 +896,7 @@ export function runTest(testMain: (gc: GlobalTestState) =>
Promise<void>) {
console.log("test logs and config can be found under", gc.testDir);
console.log("keeping test environment running");
} else {
- await gc.terminate();
+ await gc.shutdown();
console.log("test logs and config can be found under", gc.testDir);
process.exit(ret);
}
diff --git a/packages/taler-integrationtests/src/merchantApiTypes.ts
b/packages/taler-integrationtests/src/merchantApiTypes.ts
index 412b9bb8..fe70c356 100644
--- a/packages/taler-integrationtests/src/merchantApiTypes.ts
+++ b/packages/taler-integrationtests/src/merchantApiTypes.ts
@@ -93,6 +93,7 @@ export const codecForCheckPaymentUnpaidResponse = ():
codec.Codec<
.makeCodecForObject<CheckPaymentUnpaidResponse>()
.property("order_status", codec.makeCodecForConstString("unpaid"))
.property("taler_pay_uri", codec.codecForString)
+ .property("order_status_url", codec.codecForString)
.property(
"already_paid_order_id",
codec.makeCodecOptional(codec.codecForString),
@@ -161,6 +162,8 @@ export interface CheckPaymentUnpaidResponse {
// URI that the wallet must process to complete the payment.
taler_pay_uri: string;
+ order_status_url: string;
+
// Alternative order ID which was paid for already in the same session.
// Only given if the same product was purchased before in the same session.
already_paid_order_id?: string;
diff --git a/packages/taler-integrationtests/src/test-payment-multiple.ts
b/packages/taler-integrationtests/src/test-payment-multiple.ts
index b92513d4..2914b718 100644
--- a/packages/taler-integrationtests/src/test-payment-multiple.ts
+++ b/packages/taler-integrationtests/src/test-payment-multiple.ts
@@ -137,5 +137,5 @@ runTest(async (t: GlobalTestState) => {
t.assertTrue(orderStatus.order_status === "paid");
- await t.terminate();
+ await t.shutdown();
});
diff --git a/packages/taler-integrationtests/src/test-payment.ts
b/packages/taler-integrationtests/src/test-payment.ts
index fe44c183..cfe65a6f 100644
--- a/packages/taler-integrationtests/src/test-payment.ts
+++ b/packages/taler-integrationtests/src/test-payment.ts
@@ -76,5 +76,5 @@ runTest(async (t: GlobalTestState) => {
t.assertTrue(orderStatus.order_status === "paid");
- await t.terminate();
+ await t.shutdown();
});
diff --git a/packages/taler-integrationtests/src/test-withdrawal.ts
b/packages/taler-integrationtests/src/test-withdrawal.ts
index 67720a8a..a856560d 100644
--- a/packages/taler-integrationtests/src/test-withdrawal.ts
+++ b/packages/taler-integrationtests/src/test-withdrawal.ts
@@ -64,5 +64,5 @@ runTest(async (t: GlobalTestState) => {
const balResp =
walletTypes.codecForBalancesResponse().decode(balApiResp.result);
t.assertAmountEquals("TESTKUDOS:9.72", balResp.balances[0].available)
- await t.terminate();
+ await t.shutdown();
});
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.