gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated (f033320 -> b1015a9)


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated (f033320 -> b1015a9)
Date: Thu, 28 Jun 2018 10:42:13 +0200

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

marcello pushed a change to branch master
in repository exchange.

    from f033320  Addressing #5291.
     new 48cccb6  Reproducing [1] as a test case.
     new b1015a9  Commenting last change.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/exchange-lib/test_exchange_api_new.c   | 59 ++++++++++++++++++++++++++++++
 src/exchange-lib/testing_api_cmd_deposit.c |  3 ++
 2 files changed, 62 insertions(+)

diff --git a/src/exchange-lib/test_exchange_api_new.c 
b/src/exchange-lib/test_exchange_api_new.c
index 3b50d70..e3b3836 100644
--- a/src/exchange-lib/test_exchange_api_new.c
+++ b/src/exchange-lib/test_exchange_api_new.c
@@ -457,6 +457,62 @@ run (void *cls,
   };
 
 
+  /**
+   * This block checks whether a wire deadline
+   * very far in the future does NOT get aggregated now.
+   */
+  struct TALER_TESTING_Command unaggregation[] = {
+
+    TALER_TESTING_cmd_check_bank_empty
+      ("far-future-aggregation-a"),
+
+    CMD_TRANSFER_TO_EXCHANGE ("create-reserve-unaggregated",
+                              "EUR:5.01"),
+
+    CMD_EXEC_WIREWATCH ("wirewatch-unaggregated"),
+
+    /* "consume" reserve creation transfer.  */
+    TALER_TESTING_cmd_check_bank_transfer
+      ("check_bank_transfer-unaggregated",
+       exchange_url,
+       "EUR:5.01",
+       42,
+       2),
+
+    TALER_TESTING_cmd_withdraw_amount
+      ("withdraw-coin-unaggregated",
+       is->exchange,
+       "create-reserve-unaggregated",
+       "EUR:5",
+       MHD_HTTP_OK),
+
+    TALER_TESTING_cmd_deposit
+      ("deposit-unaggregated",
+       is->exchange,
+       "withdraw-coin-unaggregated",
+       0,
+       TALER_TESTING_make_wire_details
+         (43,
+          fakebank_url),
+       "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}",
+       /**
+        * This large time unit should NEVER result in
+        * a wire transfer from the aggregation CMD below.
+        * Bug number: #5366.
+        */
+       GNUNET_TIME_UNIT_FOREVER_REL,
+       "EUR:5",
+       MHD_HTTP_OK),
+
+    CMD_EXEC_AGGREGATOR ("aggregation-attempt"),
+
+    TALER_TESTING_cmd_check_bank_empty
+      ("far-future-aggregation-b"),
+
+    TALER_TESTING_cmd_end ()
+  };
+
+
   struct TALER_TESTING_Command refund[] = {
 
     /**
@@ -839,6 +895,9 @@ run (void *cls,
     TALER_TESTING_cmd_batch ("track",
                              track),
 
+    TALER_TESTING_cmd_batch ("unaggregation",
+                             unaggregation),
+
     TALER_TESTING_cmd_batch ("refund",
                              refund),
 
diff --git a/src/exchange-lib/testing_api_cmd_deposit.c 
b/src/exchange-lib/testing_api_cmd_deposit.c
index d5c0542..07895c1 100644
--- a/src/exchange-lib/testing_api_cmd_deposit.c
+++ b/src/exchange-lib/testing_api_cmd_deposit.c
@@ -225,6 +225,9 @@ deposit_run (void *cls,
   ds->merchant_priv.eddsa_priv = *merchant_priv;
   GNUNET_free (merchant_priv);
 
+  /* FIXME: this looks very odd: why take times as relatives,
+   * just to convert them to absolutes soon after? */
+
   if (0 != ds->refund_deadline.rel_value_us)
   {
     refund_deadline = GNUNET_TIME_relative_to_absolute

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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