Skip to content

Commit dce589c

Browse files
test(aiohttp): Delete test which depends on AIOHTTP behavior (getsentry#3568)
This test was added in getsentry#3554 to ensure that we don't break people's AIOHTTP apps when a request handler returns an invalid response. However, the test broke with a recent AIOHTTP release. After investigating, I believe the test broke because it depends on internal AIOHTTP implementation details which changed in the recent AIOHTTP release. This test likely does not add too much value anyways, since the change in getsentry#3554 includes a comment, which explains why handling the AttributeError is important, so I think we can safely remove it. Fixes getsentry#3567
1 parent 6489fa0 commit dce589c

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

tests/integrations/aiohttp/test_aiohttp.py

-21
Original file line numberDiff line numberDiff line change
@@ -605,27 +605,6 @@ async def hello(request):
605605
assert event["spans"][0]["origin"] == "auto.http.aiohttp"
606606

607607

608-
@pytest.mark.asyncio
609-
@pytest.mark.parametrize("invalid_response", (None, "invalid"))
610-
async def test_invalid_response(
611-
sentry_init, aiohttp_client, capture_events, invalid_response
612-
):
613-
sentry_init(integrations=[AioHttpIntegration()])
614-
615-
async def handler(_):
616-
return invalid_response
617-
618-
app = web.Application()
619-
app.router.add_get("/", handler)
620-
621-
client = await aiohttp_client(app)
622-
623-
# Invalid response should result on a ServerDisconnectedError in the client side, not an internal server error.
624-
# Important to note that the ServerDisconnectedError indicates we have no error server-side.
625-
with pytest.raises(ServerDisconnectedError):
626-
await client.get("/")
627-
628-
629608
@pytest.mark.parametrize(
630609
("integration_kwargs", "exception_to_raise", "should_capture"),
631610
(

0 commit comments

Comments
 (0)