Attempt to fix flaky integration test#41490
Conversation
|
Documentation preview for this PR (built with commit 2de7c48; changes) is ready! 🎉 |
fchapoton
left a comment
There was a problem hiding this comment.
looks good. Maybe use my suggested change ?
Co-authored-by: Frédéric Chapoton <chapoton@unistra.fr>
|
Done. Anything else? |
|
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. |
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. |
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
⌛ Dependencies