From 96c2fb8e107451c6e26e37c55f0dcbf91cfefd28 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 11 Aug 2018 11:29:02 +0200 Subject: implement retries for a few more commands --- src/include/taler_testing_lib.h | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/include/taler_testing_lib.h') diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index 8e55c058c..8db59ee45 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -835,6 +835,17 @@ TALER_TESTING_cmd_deposit unsigned int expected_response_code); +/** + * Modify a deposit command to enable retries when we get transient + * errors from the exchange. + * + * @param cmd a deposit command + * @return the command with retries enabled + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_deposit_with_retry (struct TALER_TESTING_Command cmd); + + /** * Create a "refresh melt" command. * @@ -855,6 +866,7 @@ TALER_TESTING_cmd_refresh_melt const char *coin_reference, unsigned int expected_response_code); + /** * Create a "refresh melt" CMD that does TWO /refresh/melt * requests. This was needed to test the replay of a valid melt @@ -878,6 +890,16 @@ TALER_TESTING_cmd_refresh_melt_double unsigned int expected_response_code); +/** + * Modify a "refresh melt" command to enable retries. + * + * @param cmd command + * @return modified command. + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_refresh_melt_with_retry (struct TALER_TESTING_Command cmd); + + /** * Create a "refresh reveal" command. * @@ -896,6 +918,16 @@ TALER_TESTING_cmd_refresh_reveal unsigned int expected_response_code); +/** + * Modify a "refresh reveal" command to enable retries. + * + * @param cmd command + * @return modified command. + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_refresh_reveal_with_retry (struct TALER_TESTING_Command cmd); + + /** * Create a "refresh link" command. * @@ -914,6 +946,16 @@ TALER_TESTING_cmd_refresh_link unsigned int expected_response_code); +/** + * Modify a "refresh link" command to enable retries. + * + * @param cmd command + * @return modified command. + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_refresh_link_with_retry (struct TALER_TESTING_Command cmd); + + /** * Create a "track transaction" command. * -- cgit v1.2.3