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_overrunning_test_times_out is flaky #51

Open
altendky opened this issue Jul 2, 2020 · 3 comments · Fixed by #54
Open

test_overrunning_test_times_out is flaky #51

altendky opened this issue Jul 2, 2020 · 3 comments · Fixed by #54

Comments

@altendky
Copy link
Owner

altendky commented Jul 2, 2020

FAILED C:\hostedtoolcache\windows\Python\3.6.8\x86\lib\site-packages\qtrio_tests\test_pytest.py::test_overrunning_test_times_out

https://github.com/altendky/qtrio/pull/50/checks?check_run_id=828834279

2020-07-02T01:11:11.5061202Z E               subprocess.TimeoutExpired: Command '('c:\\hostedtoolcache\\windows\\python\\3.6.8\\x86\\python.exe', '-mpytest', '--basetemp=C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_overrunning_test_times_out0\\runpytest-0')' timed out after 6 seconds

At first glance it looks like @qtrio.host isn't timing out properly thus resulting in a subprocess timeout instead. It doesn't seem like the subprocess launch time should be sufficient to cause this but... usually it doesn't. So, maybe that's it and the subprocess timeout just (appropriately) needs a significant bump to reduce flakiness. Unless maybe we can come up with a better way.

def test_overrunning_test_times_out(testdir):
"""The overrunning test is timed out."""
test_file = rf"""
import qtrio
import trio
@qtrio.host
async def test(request):
await trio.sleep({2 * qtrio._pytest.timeout})
"""
testdir.makepyfile(test_file)
timeout = qtrio._pytest.timeout
result = testdir.runpytest_subprocess(timeout=2 * qtrio._pytest.timeout)
result.assert_outcomes(failed=1)
result.stdout.re_match_lines(
lines2=[f"E AssertionError: test not finished within {timeout} seconds"],
)

@altendky
Copy link
Owner Author

altendky commented Jul 3, 2020

Apparently that didn't fix it. All through poking at the macOS issues today Windows didn't fail once. Ugh.

https://github.com/altendky/qtrio/pull/58/checks?check_run_id=832969315

@altendky altendky reopened this Jul 3, 2020
@altendky altendky removed this from the Preliminary milestone Jul 11, 2020
@altendky
Copy link
Owner Author

Been ok for awhile now... :|

@altendky
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant