[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: Fix db testcase aga
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: Fix db testcase against newest plugin. |
Date: |
Mon, 20 Mar 2017 15:37:52 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 2e761cd Fix db testcase against newest plugin.
2e761cd is described below
commit 2e761cdd0b811f4a283c424ccdf5de4dcabd9eb3
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Mar 20 15:37:30 2017 +0100
Fix db testcase against newest plugin.
---
src/backenddb/plugin_merchantdb_postgres.c | 5 ++++-
src/backenddb/test_merchantdb.c | 8 ++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/backenddb/plugin_merchantdb_postgres.c
b/src/backenddb/plugin_merchantdb_postgres.c
index afd6e8e..9de6294 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -865,6 +865,8 @@ postgres_find_proposal_data_by_date_and_range (void *cls,
if ( (0 == (n = PQntuples (result))) ||
(NULL == cb) )
{
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "No records found.\n");
PQclear (result);
return n;
}
@@ -927,6 +929,7 @@ postgres_find_proposal_data_by_date (void *cls,
void *cb_cls)
{
+ uint64_t r64 = nrows;
struct PostgresClosure *pg = cls;
PGresult *result;
unsigned int n;
@@ -935,7 +938,7 @@ postgres_find_proposal_data_by_date (void *cls,
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_absolute_time (&date),
GNUNET_PQ_query_param_auto_from_type (merchant_pub),
- GNUNET_PQ_query_param_uint32 (&nrows),
+ GNUNET_PQ_query_param_uint64 (&r64),
GNUNET_PQ_query_param_end
};
result = GNUNET_PQ_exec_prepared (pg->conn,
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index de01023..f4300b2 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -332,7 +332,7 @@ run (void *cls)
timestamp = GNUNET_TIME_absolute_get();
GNUNET_TIME_round_abs (×tamp);
delta = GNUNET_TIME_UNIT_MINUTES;
- fake_now = GNUNET_TIME_absolute_subtract (timestamp, delta);
+ fake_now = GNUNET_TIME_absolute_add (timestamp, delta);
refund_deadline = GNUNET_TIME_absolute_get();
GNUNET_TIME_round_abs (&refund_deadline);
GNUNET_assert (GNUNET_OK ==
@@ -382,8 +382,8 @@ run (void *cls)
plugin->find_proposal_data_by_date_and_range (plugin->cls,
fake_now,
&merchant_pub,
- 0,
- 5,
+ 2,
+ 1,
pd_cb,
NULL));
@@ -391,7 +391,7 @@ run (void *cls)
plugin->find_proposal_data_by_date (plugin->cls,
fake_now,
&merchant_pub,
- 5,
+ 1,
pd_cb,
NULL));
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: Fix db testcase against newest plugin.,
gnunet <=