diff options
Diffstat (limited to 'src/testing/test_merchant_api.c')
-rw-r--r-- | src/testing/test_merchant_api.c | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c index 93c3af55..67dea30f 100644 --- a/src/testing/test_merchant_api.c +++ b/src/testing/test_merchant_api.c @@ -36,6 +36,22 @@ #include <taler/taler_error_codes.h> #include "taler_merchant_testing_lib.h" + +/** + * The 'poll-orders-conclude-1' and other 'conclude' + * commands should NOT wait for this timeout! + */ +#define POLL_ORDER_TIMEOUT \ + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) + +/** + * The 'poll-orders-conclude-1x' and other 'conclude' + * commands that should (!) wait for this timeout! Hence, + * here we use a short value! + */ +#define POLL_ORDER_SHORT_TIMEOUT \ + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) + /** * Configuration file we use. One (big) configuration is used * for the various components for this test. @@ -206,14 +222,12 @@ run (void *cls, PAYTO_I1, "EUR", MHD_HTTP_NO_CONTENT), -#if FIXME TALER_TESTING_cmd_merchant_kyc_get ("instance-create-kyc-0", merchant_url, NULL, NULL, EXCHANGE_URL, - MHD_HTTP_OK), -#endif + MHD_HTTP_NO_CONTENT), TALER_TESTING_cmd_merchant_post_orders_no_claim ("create-proposal-4", merchant_url, MHD_HTTP_OK, @@ -280,7 +294,7 @@ run (void *cls, MHD_HTTP_NOT_FOUND), TALER_TESTING_cmd_poll_orders_start ("poll-orders-1-start", merchant_url, - GNUNET_TIME_UNIT_MINUTES), + POLL_ORDER_TIMEOUT), TALER_TESTING_cmd_merchant_claim_order ("claim-order-nx", merchant_url, MHD_HTTP_NOT_FOUND, @@ -369,18 +383,18 @@ run (void *cls, TALER_TESTING_cmd_wallet_poll_order_start ("poll-order-wallet-start-1", merchant_url, "create-proposal-1", - GNUNET_TIME_UNIT_MINUTES, + POLL_ORDER_TIMEOUT, NULL), TALER_TESTING_cmd_wallet_poll_order_start2 ("poll-order-wallet-start-1x", merchant_url, "create-proposal-1x", - GNUNET_TIME_UNIT_MINUTES, - NULL, + POLL_ORDER_SHORT_TIMEOUT, + NULL, /* no refund */ "session-0"), TALER_TESTING_cmd_poll_order_start ("poll-order-merchant-1-start", merchant_url, "1", - GNUNET_TIME_UNIT_MINUTES), + POLL_ORDER_TIMEOUT), TALER_TESTING_cmd_merchant_pay_order ("deposit-simple", merchant_url, MHD_HTTP_OK, @@ -396,6 +410,7 @@ run (void *cls, MHD_HTTP_OK, NULL, "poll-order-wallet-start-1"), + /* Here we expect to run into a timeout, as we do not pay this one */ TALER_TESTING_cmd_wallet_poll_order_conclude2 ("poll-order-1x-conclude", MHD_HTTP_OK, NULL, @@ -708,13 +723,13 @@ run (void *cls, TALER_TESTING_cmd_wallet_poll_order_start ("poll-order-wallet-refund-1-low", merchant_url, "create-proposal-1r", - GNUNET_TIME_UNIT_MINUTES, + POLL_ORDER_TIMEOUT, "EUR:0.01"), TALER_TESTING_cmd_wallet_poll_order_start ( "poll-order-wallet-refund-1-high", merchant_url, "create-proposal-1r", - GNUNET_TIME_UNIT_MINUTES, + POLL_ORDER_TIMEOUT, "EUR:0.2"), TALER_TESTING_cmd_merchant_pay_order ("pay-for-refund-1r", merchant_url, @@ -727,7 +742,7 @@ run (void *cls, TALER_TESTING_cmd_poll_order_start ("poll-payment-refund-1", merchant_url, "1r", /* proposal name, not cmd ref! */ - GNUNET_TIME_UNIT_MINUTES), + POLL_ORDER_TIMEOUT), TALER_TESTING_cmd_merchant_order_refund ("refund-increase-1r", merchant_url, "refund test", |