Closed scailer closed 4 years ago
Sometimes (~10%) get error in tests. Can't understand reasons.
ERROR: http.client.test_raw_stream_large (home.scailer.tmp.pulsar.tests.http.test.client.TestHttpClient)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scailer/tmp/pulsar/pulsar/apps/test/runner.py", line 234, in store_trace
await coro
File "/home/scailer/tmp/pulsar/tests/http/base.py", line 848, in test_raw_stream_large
data = await raw.read()
File "/home/scailer/tmp/pulsar/pulsar/apps/http/stream.py", line 33, in read
async for body in self:
File "/home/scailer/tmp/pulsar/pulsar/apps/http/stream.py", line 62, in __anext__
return await self._queue.get()
File "/usr/lib64/python3.7/asyncio/queues.py", line 159, in get
await getter
concurrent.futures._base.CancelledError
wow, thanks for this PR. Lots of changes
I think it is time to switch to pytest
+1 for this PR. I just ran into some problems that are fixed here when trying to upgrade to python 3.7. Pulsar doesn't work on 3.7 without it.
Updates for python 3.7
Rename async -> asynclib (async become language keyword)
Fix tests/http/test_tools.py Changed in version 3.7: Moved from RFC 2396 to RFC 3986 for quoting URL strings. “~” is now included in the set of reserved characters. https://docs.python.org/3.7/library/urllib.parse.html#module-urllib.parse
Fix pulsar/asynclib/lock.py Changed in version 3.7: When fut is cancelled due to a timeout, wait_for now waits for fut to be cancelled. Previously, it raised TimeoutError immediately. https://docs.python.org/3/library/asyncio-task.html