[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: test retry transfer with same re
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: test retry transfer with same request_id |
Date: |
Thu, 16 Jul 2020 02:42:24 +0200 |
This is an automated email from the git hooks/post-receive script.
jonathan-buchanan pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 5658c4c5 test retry transfer with same request_id
5658c4c5 is described below
commit 5658c4c52b01a39d9302d3407cd53e96f545237c
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
AuthorDate: Wed Jul 15 20:41:45 2020 -0400
test retry transfer with same request_id
---
src/include/taler_testing_lib.h | 11 +++++++++++
src/testing/test_bank_api_twisted.c | 31 +++++++++++++++++++++----------
2 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 332b429f..b9a11865 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -972,6 +972,17 @@ TALER_TESTING_cmd_transfer (const char *label,
const char *exchange_base_url);
+/**
+ * Modify a transfer command to enable retries when the reserve is not yet
+ * full or we get other transient errors from the bank.
+ *
+ * @param cmd a fakebank transfer command
+ * @return the command with retries enabled
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_transfer_retry (struct TALER_TESTING_Command cmd);
+
+
/**
* Make the "exec-auditor" CMD.
*
diff --git a/src/testing/test_bank_api_twisted.c
b/src/testing/test_bank_api_twisted.c
index d8687e97..d17c3c81 100644
--- a/src/testing/test_bank_api_twisted.c
+++ b/src/testing/test_bank_api_twisted.c
@@ -82,18 +82,29 @@ static void
run (void *cls,
struct TALER_TESTING_Interpreter *is)
{
+ struct TALER_WireTransferIdentifierRawP wtid;
+
+ memset (&wtid, 0x5aff, sizeof (wtid));
+
+ /* Route our commands through twister. */
+ struct TALER_BANK_AuthenticationData exchange_auth_twisted;
+ memcpy (&exchange_auth_twisted,
+ &bc.exchange_auth,
+ sizeof (struct TALER_BANK_AuthenticationData));
+ exchange_auth_twisted.wire_gateway_url = "http://localhost:8888/2/";
struct TALER_TESTING_Command commands[] = {
- /**
- * Can't use the "wait service" CMD here because the
- * fakebank runs inside the same process of the test.
- */
- TALER_TESTING_cmd_wait_service ("wait-service",
- twister_url),
- TALER_TESTING_cmd_bank_credits ("history-0",
- &bc.exchange_auth,
- NULL,
- 5),
+ /* Test retrying transfer after failure. */
+ TALER_TESTING_cmd_malform_response ("malform-transfer",
+ CONFIG_FILE_FAKEBANK),
+ TALER_TESTING_cmd_transfer_retry (
+ TALER_TESTING_cmd_transfer ("debit-1",
+ "KUDOS:3.22",
+ &exchange_auth_twisted,
+ bc.exchange_payto,
+ bc.user42_payto,
+ &wtid,
+ "http://exchange.example.com/")),
TALER_TESTING_cmd_end ()
};
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: test retry transfer with same request_id,
gnunet <=