use retry in benchmark

This commit is contained in:
Christian Grothoff 2018-08-10 12:40:37 +02:00
parent db65bc69bf
commit e17121fd1c
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 12 additions and 6 deletions

View File

@ -372,12 +372,14 @@ run (void *cls,
GNUNET_asprintf (&order_enc,
"{\"nonce\": %u}",
i);
unit[0] = TALER_TESTING_cmd_withdraw_amount
(withdraw_label,
is->exchange,
"create-reserve",
AMOUNT_5,
MHD_HTTP_OK);
unit[0] =
TALER_TESTING_cmd_withdraw_with_retry
(TALER_TESTING_cmd_withdraw_amount
(withdraw_label,
is->exchange,
"create-reserve",
AMOUNT_5,
MHD_HTTP_OK));
unit[1] = TALER_TESTING_cmd_deposit
("deposit",
is->exchange,

View File

@ -169,6 +169,10 @@ reserve_withdraw_cb (void *cls,
{
if (GNUNET_YES == ws->do_retry)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Retrying withdraw failed with %u/%d\n",
http_status,
(int) ec);
if ( (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec) ||
(TALER_EC_WITHDRAW_INSUFFICIENT_FUNDS == ec) ||
(TALER_EC_WITHDRAW_RESERVE_UNKNOWN == ec) ||