Reproducing [1] as a test case.

[1] https://gnunet.org/bugs/view.php?id=5366#c13087
This commit is contained in:
Marcello Stanisci 2018-06-28 10:38:42 +02:00
parent f033320300
commit 48cccb62ca
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 57 additions and 0 deletions

View File

@ -457,6 +457,57 @@ 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}]}",
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 +890,9 @@ run (void *cls,
TALER_TESTING_cmd_batch ("track",
track),
TALER_TESTING_cmd_batch ("unaggregation",
unaggregation),
TALER_TESTING_cmd_batch ("refund",
refund),

View File

@ -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