Skip to content

Commit fb670de

Browse files
author
Release Manager
committed
gh-41490: Attempt to fix flaky integration test
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> Attempt to fix a flaky integration test where interruptions on CI are longer than expected. See https://github.com/sagemath/sage/actions/runs/ 21149870292/job/60823450329 for a recent example of this test failing on CI. A slightly hacky fix, but this is a weird test because it is testing that something is *not* interruptible. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #41490 Reported by: Vincent Macri Reviewer(s): Frédéric Chapoton
2 parents 4ea9bb1 + 2de7c48 commit fb670de

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=11330990e28c32a9fbadea9fe7430239d653d24f
3-
sha256=64095eaad6bbe5e63a219ba1559bea6af73e9f73caca5f5e0378cbb48686b7bf
2+
sha1=61b4a24ac9eadb7d615f548fd8834113ececeff7
3+
sha256=1fa4b72f448d23d2fc0c2cb615c4b72c067ffed134f34ed361444e5e69405ad7
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
813468e6b5fb3d9de100ca0c1522b3450391f599
1+
233b89a77b76d6d126de436982cdebd42e307c84

src/sage/calculus/integration.pyx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,13 @@ def numerical_integral(func, a, b=None,
287287
sage: def f(x):
288288
....: sleep(1r)
289289
....: return x
290-
sage: with ensure_interruptible_after(0.5): numerical_integral(f, 0, 1)
290+
sage: with ensure_interruptible_after(0.5) as data: numerical_integral(f, 0, 1)
291291
Traceback (most recent call last):
292292
...
293-
RuntimeError: Function is not interruptible within 0.5000 seconds, only after 1.0... seconds
293+
RuntimeError: Function is not interruptible within 0.5000 seconds, only after 1... seconds
294+
sage: # The elapsed time should be less than 1.1, but can sometimes take longer on CI
295+
sage: 1 <= data['elapsed'] <= 1.5
296+
True
294297
295298
"""
296299
cdef double abs_err # step size

0 commit comments

Comments
 (0)