You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2026/08/27 19:37:34 UTC
(allura) branch master updated: retry test_markdown_many_bad_links a few times to avoid false-positive failures
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new f09fad9a2 retry test_markdown_many_bad_links a few times to avoid false-positive failures
f09fad9a2 is described below
commit f09fad9a262f11a2a98df99f8230424d82a98fa1
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Thu Aug 27 15:37:10 2026 -0400
retry test_markdown_many_bad_links a few times to avoid false-positive failures
---
Allura/allura/tests/test_globals.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index ab1a09c17..34c242202 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -659,10 +659,13 @@ def do_test(size: int):
assert r.startswith('<div class="markdown_content"><p><span>[abc]</span>(https://example.com/airboot. <a href="https://example.com/" rel="nofollow">foo</a> <a href="https://example.com/" rel="nofollow">foo</a>')
return t2 - t1
- short_time = do_test(2)
- long_time = do_test(20)
-
- slowness = long_time / short_time
+ # timing can be noisy under load, so retry a few times before failing
+ for _ in range(3):
+ short_time = do_test(2)
+ long_time = do_test(20)
+ slowness = long_time / short_time
+ if slowness < 10:
+ break
assert slowness < 10, f"Long markdown took {slowness:.1f}x longer ({long_time:.4f}s vs short text ({short_time:.4f}s)"
def test_macro_include(self):