Skip to content

Conversation

@Dreamsorcerer
Copy link
Member

@Dreamsorcerer Dreamsorcerer added the bot:chronographer:skip This PR does not need to include a change note label Jan 2, 2026
@codecov
Copy link

codecov bot commented Jan 2, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4210 1 4209 108
View the top 1 failed test(s) by shortest run time
tests.test_benchmarks_web_functional::test_read_many_chunks[pyloop]
Stack Traces | 12.1s run time
aiohttp_client = <function aiohttp_client.<locals>.go at 0x294dfaf9a80>
benchmark = <pytest_codspeed.plugin.BenchmarkFixture object at 0x294e0181740>

    #x1B[0m#x1B[94masync#x1B[39;49;00m #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_read_many_chunks#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        aiohttp_client: AiohttpClient, benchmark: BenchmarkFixture#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Benchmark blocking time when receiving many small chunks."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94masync#x1B[39;49;00m #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92msender#x1B[39;49;00m() -> Iterator[#x1B[96mbytes#x1B[39;49;00m]:#x1B[90m#x1B[39;49;00m
            #x1B[94mfor#x1B[39;49;00m _ #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(#x1B[94m200000#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
                #x1B[94myield#x1B[39;49;00m #x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94masync#x1B[39;49;00m #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mhandle#x1B[39;49;00m(request: web.Request) -> web.Response:#x1B[90m#x1B[39;49;00m
            #x1B[90m# Wait until buffer is full and reading gets paused.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mwhile#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m request.protocol._reading_paused:#x1B[90m#x1B[39;49;00m
                #x1B[94mawait#x1B[39;49;00m asyncio.sleep(#x1B[94m0.01#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
            #x1B[90m# We want to measure the initial blocking time in this call.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[90m# Mocking out the ._wait() call forces the method to return at the first wait,#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[90m# without waiting for more data or processing the rest of the body.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mwith#x1B[39;49;00m mock.patch.object(request.content, #x1B[33m"#x1B[39;49;00m#x1B[33m_wait#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, autospec=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
                chunk = #x1B[94mawait#x1B[39;49;00m benchmark(request.read)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m web.Response(text=#x1B[96mstr#x1B[39;49;00m(#x1B[96mlen#x1B[39;49;00m(chunk)))#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        app = web.Application()#x1B[90m#x1B[39;49;00m
        app.router.add_post(#x1B[33m"#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, handle)#x1B[90m#x1B[39;49;00m
        client = #x1B[94mawait#x1B[39;49;00m aiohttp_client(app)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94masync#x1B[39;49;00m #x1B[94mwith#x1B[39;49;00m client.post(#x1B[33m"#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, chunked=#x1B[94mTrue#x1B[39;49;00m, data=sender()) #x1B[94mas#x1B[39;49;00m resp:#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m resp.status == #x1B[94m200#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           AssertionError: assert 500 == 200#x1B[0m
#x1B[1m#x1B[31mE            +  where 500 = <ClientResponse(http://127.0.0.1:36657/) [500 Internal Server Error]>\n<CIMultiDictProxy('Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '55', 'Date': 'Fri, 02 Jan 2026 18:37:52 GMT', 'Server': 'Python/3.14 aiohttp/4.0.0a2.dev0', 'Connection': 'close')>\n.status#x1B[0m

aiohttp_client = <function aiohttp_client.<locals>.go at 0x294dfaf9a80>
app        = <Application 0x294dfaf75c0>
benchmark  = <pytest_codspeed.plugin.BenchmarkFixture object at 0x294e0181740>
client     = <aiohttp.test_utils.TestClient object at 0x294e0182540>
handle     = <function test_read_many_chunks.<locals>.handle at 0x294dfafb640>
resp       = <ClientResponse(http://127.0.0.1:36657/) [500 Internal Server Error]>
<CIMultiDictProxy('Content-Type': 'text/plain; c...: '55', 'Date': 'Fri, 02 Jan 2026 18:37:52 GMT', 'Server': 'Python/3.14 aiohttp/4.0.0a2.dev0', 'Connection': 'close')>

sender     = <function test_read_many_chunks.<locals>.sender at 0x294dfafaec0>

#x1B[1m#x1B[31mtests/test_benchmarks_web_functional.py#x1B[0m:38: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:skip This PR does not need to include a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants