aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-20 14:50:13 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-20 14:50:13 +0100
commit532fabf20a3f9377f1f9526d38e068069a81a922 (patch)
tree9cd04f1661660957082ecb3747847b6971f5351b /src/include
parent28203913e2c928233f0b66f0599eb5703cac7fa7 (diff)
add variant of GET /reserves/ testing command with support for long polling (to diagnose reserve long polling issue reported by FD)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_testing_lib.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 829f9b8a6..19d1aaa20 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -1384,6 +1384,37 @@ TALER_TESTING_cmd_status (const char *label,
/**
+ * Create a GET "reserves" command with a @a timeout.
+ *
+ * @param label the command label.
+ * @param reserve_reference reference to the reserve to check.
+ * @param expected_balance expected balance for the reserve.
+ * @param timeout how long to long-poll for the reserve to exist.
+ * @param expected_response_code expected HTTP response code.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_reserve_poll (const char *label,
+ const char *reserve_reference,
+ const char *expected_balance,
+ struct GNUNET_TIME_Relative timeout,
+ unsigned int expected_response_code);
+
+
+/**
+ * Wait for #TALER_TESTING_cmd_reserve_poll() to finish.
+ * Fail if it did not conclude by the timeout.
+ *
+ * @param label our label
+ * @param poll_reference reference to a #TALER_TESTING_cmd_reserve_poll() command
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_reserve_poll_finish (const char *label,
+ const char *poll_reference);
+
+
+/**
* Create a POST "/reserves/$RID/history" command.
*
* @param label the command label.