gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: harness: fix payment-share in


From: gnunet
Subject: [taler-wallet-core] branch master updated: harness: fix payment-share integration test
Date: Mon, 22 Jan 2024 21:59:06 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new b9e219c02 harness: fix payment-share integration test
b9e219c02 is described below

commit b9e219c02127ec789ae44268d6e9d66ae07e2f83
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Jan 22 21:59:01 2024 +0100

    harness: fix payment-share integration test
    
    The test didn't wait for refreshes to settle before doing balance checks
---
 .../src/integrationtests/test-payment-share.ts      | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-payment-share.ts 
b/packages/taler-harness/src/integrationtests/test-payment-share.ts
index c4a82c917..ef4f8adeb 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-share.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-share.ts
@@ -104,7 +104,7 @@ export async function runPaymentShareTest(t: 
GlobalTestState) {
       claimFirstWallet.status === PreparePayResultType.PaymentPossible,
     );
 
-    //share order from the first wallet
+    // share order from the first wallet
     const { privatePayUri } = await firstWallet.call(
       WalletApiOperation.SharePayment,
       {
@@ -113,7 +113,7 @@ export async function runPaymentShareTest(t: 
GlobalTestState) {
       },
     );
 
-    //claim from the second wallet
+    // claim from the second wallet
     const claimSecondWallet = await secondWallet.call(
       WalletApiOperation.PreparePayForUri,
       { talerPayUri: privatePayUri },
@@ -123,11 +123,17 @@ export async function runPaymentShareTest(t: 
GlobalTestState) {
       claimSecondWallet.status === PreparePayResultType.PaymentPossible,
     );
 
-    //pay from the second wallet
+    // pay from the second wallet
     const r2 = await secondWallet.call(WalletApiOperation.ConfirmPay, {
       proposalId: claimSecondWallet.proposalId,
     });
 
+    // Wait for refresh to settle before we do checks
+    await secondWallet.call(
+      WalletApiOperation.TestingWaitTransactionsFinal,
+      {},
+    );
+
     t.assertTrue(r2.type === ConfirmPayResultType.Done);
     {
       const first = await firstWallet.call(WalletApiOperation.GetBalances, {});
@@ -181,7 +187,7 @@ export async function runPaymentShareTest(t: 
GlobalTestState) {
       claimFirstWallet.status === PreparePayResultType.PaymentPossible,
     );
 
-    //share order from the first wallet
+    // share order from the first wallet
     const { privatePayUri } = await firstWallet.call(
       WalletApiOperation.SharePayment,
       {
@@ -190,7 +196,7 @@ export async function runPaymentShareTest(t: 
GlobalTestState) {
       },
     );
 
-    //claim from the second wallet
+    // claim from the second wallet
     const claimSecondWallet = await secondWallet.call(
       WalletApiOperation.PreparePayForUri,
       { talerPayUri: privatePayUri },
@@ -200,13 +206,16 @@ export async function runPaymentShareTest(t: 
GlobalTestState) {
       claimSecondWallet.status === PreparePayResultType.PaymentPossible,
     );
 
-    //pay from the second wallet
+    // pay from the second wallet
     const r2 = await firstWallet.call(WalletApiOperation.ConfirmPay, {
       proposalId: claimFirstWallet.proposalId,
     });
 
     t.assertTrue(r2.type === ConfirmPayResultType.Done);
 
+    // Wait for refreshes to settle before doing checks
+    await firstWallet.call(WalletApiOperation.TestingWaitTransactionsFinal, 
{});
+
     const bal1 = await firstWallet.call(WalletApiOperation.GetBalances, {});
     t.assertAmountEquals(bal1.balances[0].available, "TESTKUDOS:16.18");
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]