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

test_idval_hypothesis flaky on Windows #3707

Closed
nicoddemus opened this issue Jul 22, 2018 · 2 comments · Fixed by #3933
Closed

test_idval_hypothesis flaky on Windows #3707

nicoddemus opened this issue Jul 22, 2018 · 2 comments · Fixed by #3933
Assignees
Labels
platform: windows windows platform-specific problem type: infrastructure improvement to development/releases/CI structure

Comments

@nicoddemus
Copy link
Member

nicoddemus commented Jul 22, 2018

This test fails on occasion on AppVeyor

_____________________ TestMetafunc.test_idval_hypothesis ______________________
[gw0] win32 -- Python 3.6.6 c:\projects\pytest\.tox\py36-xdist\scripts\python.exe
self = <metafunc.TestMetafunc object at 0x05415A50>
    @hypothesis.given(strategies.text() | strategies.binary())
>   @hypothesis.settings(
        deadline=400.0
    )  # very close to std deadline and CI boxes are not reliable in CPU power
    def test_idval_hypothesis(self, value):
C:\projects\pytest\testing\python\metafunc.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\projects\pytest\.tox\py36-xdist\lib\site-packages\hypothesis\core.py:632: in execute
    ) % (test.__name__, text_repr[0],))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hypothesis.core.StateForActualGivenExecution object at 0x05415C70>
message = "Hypothesis test_idval_hypothesis(self=<metafunc.TestMetafunc at 0x5415a50>, value='') produces unreliable results: Falsified on the first call but did not on a subsequent one"
    def __flaky(self, message):
        if len(self.falsifying_examples) <= 1:
>           raise Flaky(message)
E           hypothesis.errors.Flaky: Hypothesis test_idval_hypothesis(self=<metafunc.TestMetafunc at 0x5415a50>, value='') produces unreliable results: Falsified on the first call but did not on a subsequent one
c:\projects\pytest\.tox\py36-xdist\lib\site-packages\hypothesis\core.py:891: Flaky
--------------------------------- Hypothesis ----------------------------------
Falsifying example: test_idval_hypothesis(self=<metafunc.TestMetafunc at 0x5415a50>, value='')
Unreliable test timings! On an initial run, this test took 734.00ms, which exceeded the deadline of 400.00ms, but on a subsequent run it took 0.00 ms, which did not. If you expect this sort of variability in your test timings, consider turning deadlines off for this test by setting deadline=None.
You can reproduce this example by temporarily adding @reproduce_failure('3.66.5', b'AAAA') as a decorator on your test case

Job link: https://ci.appveyor.com/project/pytestbot/pytest/build/1.0.4742/job/d05n0vp8mjbfrp9r

@nicoddemus nicoddemus added platform: windows windows platform-specific problem type: infrastructure improvement to development/releases/CI structure labels Jul 22, 2018
@nicoddemus nicoddemus self-assigned this Jul 22, 2018
@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #814 (Mark for flaky tests), #193 (xdist: support for --boxed on windows), #1021 (test_pdb_interaction with py34-pexpect is flaky), #198 (nested conftest not found on Windows), and #2435 (f).

@nicoddemus
Copy link
Member Author

Hmmm I now see that we are running with 8 cores for some reason, we might want to change that, AppVeyor certainly doesn't have 8 cores machines. Might explain the Unreliable test timings! message.

nicoddemus added a commit to nicoddemus/pytest that referenced this issue Jul 26, 2018
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Sep 4, 2018
This hopefully fixes the flaky test_idval_hypothesis on AppVeyor

Fix pytest-dev#3707
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Sep 5, 2018
This hopefully fixes the flaky test_idval_hypothesis on AppVeyor

Fix pytest-dev#3707
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Sep 6, 2018
This hopefully fixes the flaky test_idval_hypothesis on AppVeyor

Fix pytest-dev#3707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: windows windows platform-specific problem type: infrastructure improvement to development/releases/CI structure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants