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

Fixes the button holding test randomly failing on Mac (part 2) #2127

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

raffaeler
Copy link
Contributor

@raffaeler raffaeler commented Aug 30, 2023

This is the continuation of #2121

The main point is that tests failed on mac just because the button holding uses a System.Threading.Timer and this secondary timer is served very rarely on Mac.
The latest fail was instead due to the timeout too short. This is a timeout to only avoid the test can hang forever.

These changes consists in:

  • Making the timeout very long because the already fixed test failed because of a timeout (Update RaspberryBoardInfo.cs for pi400 Rev 1.1 #2124 (comment))
  • Fixing the only other test that asserts Holding as true
  • No need to fix the tests asserting Holding as false
  • Shortening the times used by the tests to avoid wasting time during the CI process

Please note there is no open issue for this problem

Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio label Aug 30, 2023
@Ellerbach
Copy link
Member

The question now is why do the tests fails on Linux now? We had this issue on Mac debug but never elsewhere.

@raffaeler
Copy link
Contributor Author

The question now is why do the tests fails on Linux now? We had this issue on Mac debug but never elsewhere.

The failures that you are seeing now are due to a change I made to see if they could solve the issue on the Mac.
The problem is related to the delta between the end of the timer and the holding event.
I am not sure why the holding event was designed to have a started and completed state. The started happens when the timer expires and the complete when the button is released.
On the mac the complete never happens so I wanted to see if at least I could see the started event. With this change, the tests on Windows passes, but not on Linux.

@raffaeler
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@krwq krwq added the * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label Aug 31, 2023
@joperezr joperezr removed their assignment Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants