gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] 01/04: do not use hugely futuristic time w


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] 01/04: do not use hugely futuristic time while testing /history
Date: Tue, 25 Jul 2017 16:53:31 +0200

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

marcello pushed a commit to branch master
in repository merchant.

commit 1a930818434c5a82aa620d6e861969374232ee61
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jul 25 16:00:36 2017 +0200

    do not use hugely futuristic time while testing /history
---
 src/lib/test_merchant_api.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index cc193b1..b533a9f 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -2257,6 +2257,10 @@ interpreter_run (void *cls)
     return;
   }
   case OC_HISTORY:
+    if (0 == cmd->details.history.date.abs_value_us)
+      cmd->details.history.date = GNUNET_TIME_absolute_add
+        (GNUNET_TIME_absolute_get (),
+         GNUNET_TIME_UNIT_HOURS);
     if (NULL == (cmd->details.history.ho
         = TALER_MERCHANT_history (ctx,
                                  MERCHANT_URI,
@@ -2710,8 +2714,12 @@ run (void *cls)
     { .oc = OC_HISTORY,
       .label = "history-1",
       .expected_response_code = MHD_HTTP_OK,
-      /*all records to be returned*/
-      .details.history.date.abs_value_us = 99999999999 * 1000LL * 1000LL,
+      /**
+       * all records to be returned; setting date as 0 lets the interpreter
+       * set it as 'now' + one hour delta, just to make sure it surpasses the
+       * proposal's timestamp.
+       */
+      .details.history.date.abs_value_us = 0,
       .details.history.nresult = 2,
       .details.history.start = 10,
       .details.history.nrows = 10
@@ -2720,7 +2728,7 @@ run (void *cls)
       .label = "history-2",
       .expected_response_code = MHD_HTTP_OK,
       /*no records returned, time limit too ancient*/
-      .details.history.date.abs_value_us = 0,
+      .details.history.date.abs_value_us = 1,
       .details.history.nresult = 0,
       .details.history.start = 10,
       .details.history.nrows = 10

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



reply via email to

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