Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpilib] Wait 0.5s after enabling interrupts in tests #6891

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

Gold856
Copy link
Contributor

@Gold856 Gold856 commented Jul 29, 2024

If the interrupt edge tests are running while under heavy CPU load (like building wpilib,) they are prone to failure since the interrupt thread doesn't have enough time to set up callbacks. The interrupt edge tests now behave like the original AsynchronousInterrupt test, which has a 0.5s delay after the interrupt is enabled. Running the new interrupt tests while building allwpilib causes almost no failures compared to the old tests.

If the interrupt edge tests are running while under heavy CPU load (like building wpilib,) they are prone to failure since the interrupt thread doesn't have enough time to set up callbacks. The interrupt edge tests now copy the original AsynchronousInterrupt test, which has a 0.5s delay after the interrupt is enabled. Running the new interrupt tests while building allwpilib causes far less failures than the old tests.
@Gold856 Gold856 requested a review from a team as a code owner July 29, 2024 02:36
@rzblue
Copy link
Member

rzblue commented Jul 29, 2024

rerunning the windows job just to test again

@PeterJohnson PeterJohnson merged commit 24dd544 into wpilibsuite:main Jul 29, 2024
34 checks passed
@Gold856 Gold856 deleted the fix-flaky-interrupt-tests branch July 29, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants