summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-07 18:51:14 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-07 18:51:54 +0100
commit8d312562bf04eeb2afac53a2f24624f8e48529bd (patch)
treeff8ee7336406c4f8805ed9cee320acd105e77004 /src/testing
parentdde5d38c4f895b53f4bd3423487573fc3e884351 (diff)
downloadexchange-8d312562bf04eeb2afac53a2f24624f8e48529bd.tar.gz
exchange-8d312562bf04eeb2afac53a2f24624f8e48529bd.tar.bz2
exchange-8d312562bf04eeb2afac53a2f24624f8e48529bd.zip
adjust ECs
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_auditor_deposit_confirmation.c4
-rw-r--r--src/testing/testing_api_cmd_auditor_exchanges.c4
-rw-r--r--src/testing/testing_api_cmd_bank_admin_add_incoming.c4
-rw-r--r--src/testing/testing_api_cmd_bank_transfer.c4
-rw-r--r--src/testing/testing_api_cmd_deposit.c4
-rw-r--r--src/testing/testing_api_cmd_refresh.c12
-rw-r--r--src/testing/testing_api_cmd_withdraw.c12
7 files changed, 22 insertions, 22 deletions
diff --git a/src/testing/testing_api_cmd_auditor_deposit_confirmation.c b/src/testing/testing_api_cmd_auditor_deposit_confirmation.c
index 2d1ff9c24..f40d78c88 100644
--- a/src/testing/testing_api_cmd_auditor_deposit_confirmation.c
+++ b/src/testing/testing_api_cmd_auditor_deposit_confirmation.c
@@ -153,7 +153,7 @@ deposit_confirmation_cb (void *cls,
{
dcs->do_retry--;
if ( (0 == hr->http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -161,7 +161,7 @@ deposit_confirmation_cb (void *cls,
hr->http_status,
(int) hr->ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
dcs->backoff = GNUNET_TIME_UNIT_ZERO;
else
dcs->backoff = GNUNET_TIME_randomized_backoff (dcs->backoff,
diff --git a/src/testing/testing_api_cmd_auditor_exchanges.c b/src/testing/testing_api_cmd_auditor_exchanges.c
index 3c77f7d82..1e412b2d1 100644
--- a/src/testing/testing_api_cmd_auditor_exchanges.c
+++ b/src/testing/testing_api_cmd_auditor_exchanges.c
@@ -146,7 +146,7 @@ exchanges_cb (void *cls,
{
es->do_retry--;
if ( (0 == hr->http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -154,7 +154,7 @@ exchanges_cb (void *cls,
hr->http_status,
(int) hr->ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
es->backoff = GNUNET_TIME_UNIT_ZERO;
else
es->backoff = GNUNET_TIME_randomized_backoff (es->backoff,
diff --git a/src/testing/testing_api_cmd_bank_admin_add_incoming.c b/src/testing/testing_api_cmd_bank_admin_add_incoming.c
index 0ea5a058c..df1eb0a32 100644
--- a/src/testing/testing_api_cmd_bank_admin_add_incoming.c
+++ b/src/testing/testing_api_cmd_bank_admin_add_incoming.c
@@ -246,7 +246,7 @@ confirmation_cb (void *cls,
{
fts->do_retry--;
if ( (0 == http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == http_status) )
{
GNUNET_log (
@@ -255,7 +255,7 @@ confirmation_cb (void *cls,
http_status,
(int) ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == ec)
fts->backoff = GNUNET_TIME_UNIT_ZERO;
else
fts->backoff = GNUNET_TIME_randomized_backoff (fts->backoff,
diff --git a/src/testing/testing_api_cmd_bank_transfer.c b/src/testing/testing_api_cmd_bank_transfer.c
index 36d5e8919..565d6e460 100644
--- a/src/testing/testing_api_cmd_bank_transfer.c
+++ b/src/testing/testing_api_cmd_bank_transfer.c
@@ -187,7 +187,7 @@ confirmation_cb (void *cls,
{
fts->do_retry--;
if ( (0 == http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -195,7 +195,7 @@ confirmation_cb (void *cls,
http_status,
(int) ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == ec)
fts->backoff = GNUNET_TIME_UNIT_ZERO;
else
fts->backoff = EXCHANGE_LIB_BACKOFF (fts->backoff);
diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c
index 76f0722de..0eb09bd39 100644
--- a/src/testing/testing_api_cmd_deposit.c
+++ b/src/testing/testing_api_cmd_deposit.c
@@ -230,7 +230,7 @@ deposit_cb (void *cls,
{
ds->do_retry--;
if ( (0 == hr->http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -238,7 +238,7 @@ deposit_cb (void *cls,
hr->http_status,
(int) hr->ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
ds->backoff = GNUNET_TIME_UNIT_ZERO;
else
ds->backoff = GNUNET_TIME_randomized_backoff (ds->backoff,
diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c
index 9a13c1354..fcf8540c0 100644
--- a/src/testing/testing_api_cmd_refresh.c
+++ b/src/testing/testing_api_cmd_refresh.c
@@ -355,7 +355,7 @@ reveal_cb (void *cls,
{
rrs->do_retry--;
if ( (0 == hr->http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -363,7 +363,7 @@ reveal_cb (void *cls,
hr->http_status,
(int) hr->ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
rrs->backoff = GNUNET_TIME_UNIT_ZERO;
else
rrs->backoff = GNUNET_TIME_randomized_backoff (rrs->backoff,
@@ -592,7 +592,7 @@ link_cb (void *cls,
{
rls->do_retry--;
if ( (0 == hr->http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -600,7 +600,7 @@ link_cb (void *cls,
hr->http_status,
(int) hr->ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
rls->backoff = GNUNET_TIME_UNIT_ZERO;
else
rls->backoff = GNUNET_TIME_randomized_backoff (rls->backoff,
@@ -895,7 +895,7 @@ melt_cb (void *cls,
{
rms->do_retry--;
if ( (0 == hr->http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -903,7 +903,7 @@ melt_cb (void *cls,
hr->http_status,
(int) hr->ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
rms->backoff = GNUNET_TIME_UNIT_ZERO;
else
rms->backoff = GNUNET_TIME_randomized_backoff (rms->backoff,
diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c
index 5b2ad26e4..df33ef2eb 100644
--- a/src/testing/testing_api_cmd_withdraw.c
+++ b/src/testing/testing_api_cmd_withdraw.c
@@ -194,12 +194,12 @@ reserve_withdraw_cb (void *cls,
{
if (0 != ws->do_retry)
{
- if (TALER_EC_WITHDRAW_RESERVE_UNKNOWN != hr->ec)
+ if (TALER_EC_EXCHANGE_WITHDRAW_RESERVE_UNKNOWN != hr->ec)
ws->do_retry--; /* we don't count reserve unknown as failures here */
if ( (0 == hr->http_status) ||
- (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec) ||
- (TALER_EC_WITHDRAW_INSUFFICIENT_FUNDS == hr->ec) ||
- (TALER_EC_WITHDRAW_RESERVE_UNKNOWN == hr->ec) ||
+ (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec) ||
+ (TALER_EC_EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS == hr->ec) ||
+ (TALER_EC_EXCHANGE_WITHDRAW_RESERVE_UNKNOWN == hr->ec) ||
(MHD_HTTP_INTERNAL_SERVER_ERROR == hr->http_status) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -207,9 +207,9 @@ reserve_withdraw_cb (void *cls,
hr->http_status,
(int) hr->ec);
/* on DB conflicts, do not use backoff */
- if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == hr->ec)
+ if (TALER_EC_GENERIC_DB_SOFT_FAILURE == hr->ec)
ws->backoff = GNUNET_TIME_UNIT_ZERO;
- else if (TALER_EC_WITHDRAW_RESERVE_UNKNOWN != hr->ec)
+ else if (TALER_EC_EXCHANGE_WITHDRAW_RESERVE_UNKNOWN != hr->ec)
ws->backoff = EXCHANGE_LIB_BACKOFF (ws->backoff);
else
ws->backoff = GNUNET_TIME_relative_max (UNKNOWN_MIN_BACKOFF,