Skip to content

Attempt to fix flaky integration test#41490

Merged
vbraun merged 3 commits intosagemath:developfrom
vincentmacri:flaky-integration
Jan 25, 2026
Merged

Attempt to fix flaky integration test#41490
vbraun merged 3 commits intosagemath:developfrom
vincentmacri:flaky-integration

Conversation

@vincentmacri
Copy link
Copy Markdown
Member

@vincentmacri vincentmacri commented Jan 21, 2026

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

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • 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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 21, 2026

Documentation preview for this PR (built with commit 2de7c48; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Comment thread src/sage/calculus/integration.pyx Outdated
Copy link
Copy Markdown
Contributor

@fchapoton fchapoton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. Maybe use my suggested change ?

Co-authored-by: Frédéric Chapoton <chapoton@unistra.fr>
@vincentmacri
Copy link
Copy Markdown
Member Author

Done. Anything else?

@user202729
Copy link
Copy Markdown
Contributor

this feels like sweeping the problem under the rug, but then we don't actually know what causes the failures either. Maybe the explanation "the CI may randomly be suspended for 0.5 seconds" is actually correct.

I'd add the "for some unknown reasons" to the code, but up to you.

@vincentmacri
Copy link
Copy Markdown
Member Author

this feels like sweeping the problem under the rug, but then we don't actually know what causes the failures either. Maybe the explanation "the CI may randomly be suspended for 0.5 seconds" is actually correct.

I don't think this is really sweeping it under the rug. The point of this test is to demonstrate that the function takes longer than 1 second. It's supposed to exceed the timeout limit. This PR doesn't change that. You're right that we don't know why it sometimes takes longer, but my educated guess is that it's simply that the CI server is frequently under very high load. This particular test sleeps the process for one second, the OS might pick up other processes to run during that second, and so it takes a few tenths of a second to pick this up again once it's done sleeping.

If this were a test that was testing that something is interruptible, I'd agree with you (and I wouldn't have done this). But this test is demonstrating that something is not interruptible.

@vincentmacri vincentmacri added the p: CI fix merged before running CI tests label Jan 24, 2026
@vbraun vbraun merged commit fb670de into sagemath:develop Jan 25, 2026
22 of 24 checks passed
@vincentmacri vincentmacri deleted the flaky-integration branch February 26, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: CI fix merged before running CI tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants