Skip to content

Pytest plugin pytest-sentry not sending issue events because it is killed #45

Description

@antonpirker

How do you use Sentry?

Sentry Saas (sentry.io)

Version

all

Steps to Reproduce

See this example project:
https://github.com/antonpirker/testing-sentry/tree/main/test-pytest-sentry

We run a flaky test multiples times using the pytest-sentry plugin for pytest (which can be found here: https://github.com/getsentry/pytest-sentry)

Expected Result

Issues representing the failed tests runs showing up in Sentry.

Actual Result

The envelopes never reach Sentry. It seems that pytest kills the process right in the middle of sending the envelope: https://github.com/getsentry/sentry-python/blob/2.23.1/sentry_sdk/transport.py#L349-L354

The line after self._request() is never reached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions