GNU bug report logs - #56563
[PATCH] gnu: tests: Fix guix-data-service test.

Previous Next

Package: guix-patches;

Reported by: Timotej Lazar <timotej.lazar <at> araneo.si>

Date: Thu, 14 Jul 2022 19:23:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Munyoki Kilyungi <me <at> bonfacemunyoki.com>
To: Timotej Lazar <timotej.lazar <at> araneo.si>
Cc: 56563 <at> debbugs.gnu.org
Subject: [bug#56563] [PATCH] gnu: tests: Fix guix-data-service test.
Date: Fri, 15 Jul 2022 00:26:16 +0300
[Message part 1 (text/plain, inline)]
Timotej Lazar <timotej.lazar <at> araneo.si> anaandika:

[...]
> +          ;; The service starts immediately but replies with status 500 until
> +          ;; initialization is complete, so keep trying for a while.
> +          (define* (try-http-get attempts)

Minor nitpick.  This function definition does not
take any optional or key-word arguments AFAICT, so
it should be a "define" instead :)

> +            (let ((status (let-values (((response text)
> +                                        (http-get #$(simple-format
> +                                                     #f "http://localhost:~A/healthcheck"
> +                                                     forwarded-port))))
> +                            (response-code response))))
> +              (if (or (= status 200) (<= attempts 1))
> +                  status
> +                  (begin (sleep 10) (try-http-get (- attempts 1))))))
> +
>            (test-equal "http-get"
>              200
> -            (let-values
> -                (((response text)
> -                  (http-get #$(simple-format
> -                               #f "http://localhost:~A/healthcheck" forwarded-port)
> -                            #:decode-body? #t)))
> -              (response-code response)))
> +            (try-http-get 10))
>  
>            (test-end))))


-- 
(Life is like a pencil that will surely run out,
    but will leave the beautiful writing of life.)
(D4F09EB110177E03C28E2FE1F5BBAE1E0392253F
    (hkp://keys.gnupg.net))
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.