question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flaky tests in CI (12% (now 3%) chance of failure)

See original GitHub issue

I’ve just run (Linux Release) CI tests 50 times in a row and out of 50 runs 6 failed with following failures:

5x (Fix pending https://github.com/dotnet/iot/pull/945):

    System.Device.Gpio.Tests.RaspberryPiDriverTests.InputPullResistorsWork [FAIL]
      Assert.Equal() Failure
      Expected: Low
      Actual:   High
      Stack Trace:
        /_/src/System.Device.Gpio.Tests/RaspberryPiDriverTests.Linux.cs(34,0): at System.Device.Gpio.Tests.RaspberryPiDriverTests.InputPullResistorsWork()

1x:

    System.Device.Gpio.Tests.SysFsDriverTests.AddCallbackFallingEdgeNotDetectedTest [FAIL]
      Assert.False() Failure
      Expected: False
      Actual:   True
      Stack Trace:
        /_/src/System.Device.Gpio.Tests/GpioControllerTestBase.cs(176,0): at System.Device.Gpio.Tests.GpioControllerTestBase.AddCallbackFallingEdgeNotDetectedTest()

cc: @pgrawehr @joperezr

We should try to understand the failures and if this is by design then retry or remove the test

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
krwqcommented, Jan 17, 2020

After merging pull up/down PR here are the stats.

3/100 failed with all 3 failures being:

    System.Device.Gpio.Tests.SysFsDriverTests.AddCallbackFallingEdgeNotDetectedTest [FAIL]
      Assert.False() Failure
      Expected: False
      Actual:   True
      Stack Trace:
        /_/src/System.Device.Gpio.Tests/GpioControllerTestBase.cs(176,0): at System.Device.Gpio.Tests.GpioControllerTestBase.AddCallbackFallingEdgeNotDetectedTest()
0reactions
pgrawehrcommented, Apr 22, 2020

I agree for now. I was already trying to improve this test (when I was doing the performance analysis) but could only improve it, but apparently not fully fix it. It seems it has to do with some pending interrupts at the time the event callback is set up, but the picture is not so clear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Flaky Tests - Semaphore CI
A test that intermittently fails for no apparent reason — or works in your local machine and fails with continuous integration — is...
Read more >
Flaky Tests at Google and How We Mitigate Them
We define a "flaky" test result as a test that exhibits both a passing and a failing result with the same code.
Read more >
We Have A Flaky Test Problem
84% of test transitions from Pass -> Fail were from flaky tests; Only 1.23% of tests ever found a breakage; Almost 16% of...
Read more >
How to reduce flaky test failures
Flaky tests, also known as flappers, fail to produce accurate and consistent results. These tests may be unreliable because of newly-written ...
Read more >
The Unexpected Costs of Flaky Tests
One of the biggest problems flaky tests create is that with inconsistent test results, developers lose faith in their validity. According to “ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found