From 5c496633092de5ebccd43e7040db2cc92b72c332 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 10 Apr 2019 17:03:24 +0200 Subject: Fixing twisted tests. It has been observed that when a "twisted" test has "very little" commands in the stack, it uses to fail since the proxied service cannot be reached. This commit puts some delay before the first command gets run by the test interpreter; both in the form of a "blind" sleep, and with a more structured 'wget' loop. --- src/include/taler_testing_lib.h | 13 +++++++++++++ 1 file changed, 13 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 31180c308..99be529b3 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -1441,6 +1441,19 @@ TALER_TESTING_cmd_sleep (const char *label, unsigned int duration_s); +/** + * This CMD simply tries to connect via HTTP to the + * service addressed by @a url. It attemps 10 times + * before giving up and make the test fail. + * + * @param label label for the command. + * @param url complete URL to connect to. + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_wait_service (const char *label, + const char *url); + + /** * Make a "check keys" command. This type of command * checks whether the number of denomination keys from -- cgit v1.2.3