aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/exchange-lib/test_exchange_api_new.c72
-rw-r--r--src/exchange-lib/testing_api_cmd_batch.c5
-rw-r--r--src/exchange-lib/testing_api_cmd_fakebank_transfer.c5
3 files changed, 51 insertions, 31 deletions
diff --git a/src/exchange-lib/test_exchange_api_new.c b/src/exchange-lib/test_exchange_api_new.c
index 854558ef7..b061d86c0 100644
--- a/src/exchange-lib/test_exchange_api_new.c
+++ b/src/exchange-lib/test_exchange_api_new.c
@@ -892,35 +892,45 @@ run (void *cls,
TALER_TESTING_cmd_end ()
};
- struct TALER_TESTING_Command reserve_open_close[] = {
-
- #define CONSTANT_KEY \
- "09QGYPEKNHBACK135BNXZFHA0YTQXT1KJDRVXF4J822G99AYNQ8G"
-
- TALER_TESTING_cmd_check_bank_empty
- ("reserve-open-close-empty"),
-
- CMD_TRANSFER_TO_EXCHANGE_SUBJECT
- ("reserve-open-close-key",
- "EUR:20",
- CONSTANT_KEY),
-
- TALER_TESTING_cmd_exec_wirewatch
- ("reserve-open-close-wirewatch",
- CONFIG_FILE_EXPIRE_RESERVE_NOW),
-
- /* Wire back to the bank */
- TALER_TESTING_cmd_exec_aggregator
- ("reserve-open-close-aggregation",
- CONFIG_FILE_EXPIRE_RESERVE_NOW),
-
- TALER_TESTING_cmd_status ("reserve-open-close-status",
- is->exchange,
- "reserve-open-close-key",
- "EUR:0",
- MHD_HTTP_OK),
- TALER_TESTING_cmd_end ()
- };
+ #define RESERVE_OPEN_CLOSE_CHUNK 4
+ #define RESERVE_OPEN_CLOSE_ITERATIONS 3
+ #define CONSTANT_KEY \
+ "09QGYPEKNHBACK135BNXZFHA0YTQXT1KJDRVXF4J822G99AYNQ8G"
+
+ struct TALER_TESTING_Command reserve_open_close
+ [(RESERVE_OPEN_CLOSE_ITERATIONS
+ * RESERVE_OPEN_CLOSE_CHUNK) + 1];
+
+ for (unsigned int i = 0;
+ i < RESERVE_OPEN_CLOSE_ITERATIONS;
+ i++)
+ {
+ reserve_open_close[i * RESERVE_OPEN_CLOSE_CHUNK]
+ = CMD_TRANSFER_TO_EXCHANGE_SUBJECT
+ ("reserve-open-close-key",
+ "EUR:20",
+ CONSTANT_KEY);
+
+ reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 1]
+ = TALER_TESTING_cmd_exec_wirewatch
+ ("reserve-open-close-wirewatch",
+ CONFIG_FILE_EXPIRE_RESERVE_NOW);
+
+ reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 2]
+ = TALER_TESTING_cmd_exec_aggregator
+ ("reserve-open-close-aggregation",
+ CONFIG_FILE_EXPIRE_RESERVE_NOW);
+
+ reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 3]
+ = TALER_TESTING_cmd_status ("reserve-open-close-status",
+ is->exchange,
+ "reserve-open-close-key",
+ "EUR:0",
+ MHD_HTTP_OK);
+ }
+ reserve_open_close
+ [RESERVE_OPEN_CLOSE_ITERATIONS * RESERVE_OPEN_CLOSE_CHUNK]
+ = TALER_TESTING_cmd_end ();
struct TALER_TESTING_Command commands[] = {
@@ -947,12 +957,12 @@ run (void *cls,
TALER_TESTING_cmd_batch ("payback",
payback),
-
+ /* Fix #5462. */
TALER_TESTING_cmd_batch ("reserve-open-close",
reserve_open_close),
/**
* End the suite. Fixme: better to have a label for this
- * too, as it shows a "(null)" token on logs.
+ * too, as it shows as "(null)" on logs.
*/
TALER_TESTING_cmd_end ()
};
diff --git a/src/exchange-lib/testing_api_cmd_batch.c b/src/exchange-lib/testing_api_cmd_batch.c
index 15b0413d7..f9e452dd5 100644
--- a/src/exchange-lib/testing_api_cmd_batch.c
+++ b/src/exchange-lib/testing_api_cmd_batch.c
@@ -94,8 +94,13 @@ batch_cleanup (void *cls,
for (unsigned int i=0;
NULL != bs->batch[i].label;
i++)
+ {
+ TALER_LOG_DEBUG ("Batch-cleaning element %u, labelled '%s'\n",
+ i,
+ bs->batch[i].label);
bs->batch[i].cleanup (bs->batch[i].cls,
&bs->batch[i]);
+ }
GNUNET_free_non_null (bs->batch);
GNUNET_free (bs);
}
diff --git a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
index 3cf9aaeec..17d1319eb 100644
--- a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
+++ b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
@@ -553,6 +553,11 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject
struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState);
+
+ TALER_LOG_DEBUG ("%s:FTS@%p\n",
+ label,
+ fts);
+
fts->bank_url = bank_url;
fts->credit_account_no = credit_account_no;
fts->debit_account_no = debit_account_no;