-
Notifications
You must be signed in to change notification settings - Fork 591
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
Add Retries to Button tests which can be flaky #2102
Conversation
Got it. Could you please post here the failure? Even if it is random, it could be useful to adopt a different strategy. |
do we know what driver is it using? there should really be no flakiness there unless it's SysFs (there is 100ms delay there which should be good enough for effectively anything). IMO there is little value in retrying this vs removing |
I did some quick skim through the code. There is absolutely no reason why this test would fail - it doesn't use GPIO at all. IMO this looks like product bug. If we're not planning to fix this right now I'd disable test project for now and open issue against this. |
I'm fine with that too. |
This is why I need to know which are the failing tests and if the behavior is randomic. |
I'm running them in a loop as we speak, you might wanna try the same - possibly slower machine is needed |
run-until-failure.bat: @echo off
:repeat
%*
IF %errorlevel% == 0 GOTO :repeat |
Did we see this failure on macOS only? perhaps ticks are different there and our defaults are wrong? (just brainstorming without reading code) |
I've run this in a loop for a while (probably around 2h) on Windows without success. At one point I even added regular for loop on each test to make it more likely for something to show up but no success 😞 |
I left the batch running for more than 1 day on Windows without seeing any failure. Then I tried to run
|
@raffaeler Are you sure you're running the latest master version? Button.tests.dll has There was however an issue with an incorrect runtime selection by the test runner, caused by a bug in the build infrastructure. I'm not sure that is relevant here, though. |
I saw you removed 3.1 from the very latest, but I assumed it should work with the version specified by Now I did
|
Now I modified the BTW I don't like this infrastructure, it's weird. |
I will leave the tests running on the RPi all night long, but they are currently running for more than 4 hours and never failed. |
The tests run for more than 2000 times on the Rpi without any failure. |
perhaps let's just disable them on macOS if this is macOS specific? I don't like doing this but I don't see a value of tests running in CI if we can't even get a log... |
Another option is to add more telemetry or logs so that we can understand what is going on and investigate. One way of doing that would be to have the test log some output to a file, and then to have a target that runs after running the tests which checks for this file and if it exists it prints it out. This would guarantee that we would get those logs even if the thread running the tests didn't have the console. |
@joperezr If you mean logging the test output, isn't this by design in If you mean something else, please explain how do you believe we/I should modify the tests. |
@raffaeler The problem is a bug in the test runner. For some reason (Jose knows more) - when the tests run on multiple CPU cores simultaneously - the output of only one CPU ends in the log, the other parts are lost somewhere. The probem would be mitigated if we found a way around this. Much of the build scripting is hidden in the arcade scripts though, and I think we don't even have direct access to that, or it would need to be fixed there. |
Most likely this bug: microsoft/vstest#2224 (please upvote) |
[Triage] We talked about this during triage and decided that we don't want to add retries as we want to ideally be able to reproduce the failure for now in order to be able to fix the test, so I'm going to go ahead and close this for now. Hopefully microsoft/vstest#2702 can get merged soon which would help us knowing which test is the culprit. |
We've seen that some of our Button tests can be flaky some times, so adding the RetryHelper we use for hardware tests should help reducing that noise. For review, it is easier to make sure you check the option of ignoring spaces which would show the real diff which is only adding RetryHelper to wrap the methods.
Microsoft Reviewers: Open in CodeFlow