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
asyncio tests are getting noisy #69459
Comments
In 3.5 and up the asyncio test are pretty chatty with warnings. E.g. a recent run gave me this in 3.5: ./python.exe -m test.test_asyncio OK (skipped=2) |
Another source of noise is this warning about a task being slow to respond. I briefly investigated this a while back. I concluded that it only happens when other tests are run before it; it does not happen when test_asyncio is run alone. It is caused by the garbage collector, because I was able to stop it by invoking gc.collect() at a particular point in the test. $ make -s -j2 && LC_TIME= ./python -bWall -m test -j0
[. . .]
[ 36/399] test_bytes
[ 37/399] test_bz2 -- running: test_buffer (32 sec), test_asyncore (42 sec), test_asyncio (44 sec)
[ 38/399] test_buffer (33 sec) -- running: test_asyncore (43 sec), test_asyncio (45 sec)
[ 39/399] test_asyncio (44 sec) -- running: test_asyncore (43 sec)
Executing <Task finished coro=<CoroutineTests.test_async_def_wrapped.<locals>.start() done, defined at /media/disk/home/proj/python/cpython/Lib/test/test_asyncio/test_pep492.py:146> result=None created at /media/disk/home/proj/python/cpython/Lib/asyncio/base_events.py:323> took 0.177 seconds
returning true from eof_received() has no effect when using ssl
returning true from eof_received() has no effect when using ssl |
This one is trivial to fix: set loop.slow_callback_duration to 1.0 |
Or call gc.collect() in that TestCase.setUp()? |
New messages seen in bpo-25693 and bpo-25748: /tmp/cpython/Lib/threading.py:864: ResourceWarning: unclosed <socket.socket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 58231)> |
I think I've fixed all of these: python/asyncio@cd4fdbb I also updated asyncio/runtests.py to print out all warnings: Closing this issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: