diff mbox series

[bug#74151,v2,4/9] tests: web: Have the retry-on-error throw on exhausted attempts.

Message ID 369fbb0b1eb904bf152356be15441aaed872c44a.1730464675.git.maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#74151,v2,1/9] doc: Use @table @code for anonip-configuration doc. | expand

Commit Message

Maxim Cournoyer Nov. 1, 2024, 12:39 p.m. UTC
Previously, it'd simply return the error arguments, which would not always
fail a 'test-assert' test, for example.

* gnu/tests/web.scm (retry-on-error): Re-throw the error when the attempts
have been exhausted.

Change-Id: Ic1468d8ba23f0f78377e90d19bccb2878dc56f0e
---
 gnu/tests/web.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index a071e05e1d..5c50322cef 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -83,7 +83,7 @@  (define retry-on-error
            return-value)
           ((#f . error-args)
            (if (>= attempt times)
-               error-args
+               (apply throw error-args)
                (begin
                  (sleep delay)
                  (loop (+ 1 attempt)))))))))